113 whats my problem? please help me

All about problems in Volume I. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

113 whats my problem? please help me

Postby @mjad » Thu Jul 22, 2010 1:09 pm

Code: Select all
#include<math.h>
#include<iostream>
using namespace std;
int main()
{
   long double f,s,t;
   //freopen("in.txt","r",stdin);
   while(scanf("%lf%lf",&f,&s)==2)
   {
      t=exp(log(s)/f);
      printf("%.0lf\n",t);
   }
   return 0;
}
@mjad
New poster
 
Posts: 44
Joined: Thu Jul 22, 2010 9:42 am

Re: 113 whats my problem? please help me

Postby Hobby » Thu Jul 29, 2010 2:41 pm

please :
printf("%ld",...)
Hobby
New poster
 
Posts: 4
Joined: Thu Jul 29, 2010 2:35 pm

Re: 113 whats my problem? please help me

Postby @mjad » Sat Jul 31, 2010 7:03 am

thanks hobby
but i did not get AC
it always WA
please help me, Specific way?
@mjad
New poster
 
Posts: 44
Joined: Thu Jul 22, 2010 9:42 am

Re: 113 whats my problem? please help me

Postby shaon_cse_cu08 » Sat Jul 31, 2010 4:02 pm

There is no problem in outputting with "%.0f" .... Just take a look at the problem carefully...

"For all such pairs 1<=n<=200 and the other condition's ...."

Try this input....

-4
16
0
56
0
0

Ur program alsways generates... 1 or 0 for this cases.... there will be no output for this

To test ur input and output try "http://uvatoolkit.com/"...

Hope That works... And don't open new Thread....if there is already one.....PLZZZ :D
I'll keep holding on...Until the walls come tumbling down...And freedom is all around ..... :x
User avatar
shaon_cse_cu08
New poster
 
Posts: 50
Joined: Tue May 25, 2010 9:10 am


Return to Volume I

Who is online

Users browsing this forum: No registered users and 1 guest