If you have searched through this forum, you would have found the solution to your problem. The input does not fit into an int, nor long nor long long. You have to use strings.
Search through this forum for 10070 for past threads to this problem. Hope this helps.
hi,
i've read all topics about 10070 and all sample matches with my output....
but still WA?? plz plz plz anybody findout bug in my code or give me some critical input.
tanx
Can anuone give me some critical I/O. I can't fix the bug o my code.plz help me.
/*My code */
#include<stdio.h>
#include<iostream.h>
#include<string.h>
#include<math.h>
int checkleap(char year[])
{
int len,check1=0,check2=0,i,j;
long int sum1=0,sum2=0;
len=strlen(year);
if(year[len-2]=='0'&&year[len-1]=='0')
check1=1;
for(i=0,j=len-1;i<2;i++,j--)
sum1+=(year[j]-48)*pow(10,i);
int len,check1=0,check2=0,i,j;
long int sum1=0,sum2=0;
len=strlen(year);
if(year[len-1]=='0'||year[len-1]=='5')
check1=1;
if((len%2)==0)
{
for(i=0;i<=len-2;i=i+2)
sum1+= year-48;