Search found 27 matches

by problem
Sun Dec 28, 2003 9:24 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 57347

hi osan still now i got wrong ans.i change my source code what u tell me.if i give input 999999 & 999999 give output 1.but if i give input 555555&555555 || 666666&666666 || 777777&777777 || 888888&888888 give correct ans.
by problem
Tue Dec 23, 2003 9:00 am
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21898

at last solve 494

hi everybody at last i solve this problem.i only change char t[30000].
by problem
Wed Dec 10, 2003 12:08 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 39824

[c] Firstly sum up all the digit of the number then sum up the factorizing number.if sum of each digit is equal to the sum of factorizing number then the number is called smith number. sample input: ------------- 20 4937774 4997775 5445454 4648787 4897987 5789798 9554564 8545644 7564545 8798798 6787...
by problem
Wed Dec 10, 2003 12:04 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79048

10038 wa

[c] #include<iostream.h> #include<string.h> #include<math.h> #include<stdio.h> void main() { unsigned long int n,check=0,l,m,che=0,b,ch=0,t,j; unsigned long int array[3000]={0}; while(cin>>m) { for(l=0;l<m;l++) { cin>>array[l]; } b=abs(array[1])-abs(array[0]); for(j=1;j<m-1;j++) { if(abs(abs(array[j...
by problem
Wed Dec 10, 2003 11:40 am
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 53720

[c] this is big input problem.i use following rule.about all of the input output is ok.but some input output is not match in actual input output.help me. any number divisible by two if last digit is divisible by two. any number divisible by 3 if sum of digits is divisible by 3. any number divisible ...
by problem
Wed Dec 10, 2003 11:26 am
Forum: Volume 4 (400-499)
Topic: 492 - Pig-Latin
Replies: 213
Views: 25594

492 little problem arise.help me

[c] #include<stdio.h> #include<string.h> #include<ctype.h> #define max 30000 void main() { char x1[max],x4[max]; char *t,*s,c; int i=0,p=0,q=0,l=0,b=0,check=0,che=0,y; while(gets(x1)) { l=strlen(x1); t=x1; s=x1; while(*t) { memset(x4,'\0',max); s=s+q; q=0; b=0; che=0; check=0; while(*t!=' '&&*t!='\n...
by problem
Wed Dec 10, 2003 11:16 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 57347

help need

[c] My program gives following output for the below input.but i dont understand why wrong ans.plz check my solution.I think a little problem is arise. help me. input:: -------- 123 456 555 555 123 594 0 1 1 0 999999999 1 1 999999999 111111111 888888888 111111112 888888888 900000000 100000000 1 1 1 9...
by problem
Wed Dec 10, 2003 11:03 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 24629

PE why ?help me.

[c] PE help me plz.here is my source code. /* @JUDGE_ID: xxxxxx 160 C++ */ #include<stdio.h> #include<string.h> int main() { long int i,j,n,k,p=0; static int x[500]; memset(x,0,500); scanf("%ld",&n); while(n>0) { for(i=2;i<=n;i++) { j=i; for(k=2;k<=i;k++) { while(j%k==0) { ++x[k]; j/=k; } } } printf...
by problem
Wed Dec 10, 2003 11:03 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 24629

PE why ?help me.

PE help me plz.here is my source code. /* @JUDGE_ID: xxxxxx 160 C++ */ #include<stdio.h> #include<string.h> int main() { long int i,j,n,k,p=0; static int x[500]; memset(x,0,500); scanf("%ld",&n); while(n>0) { for(i=2;i<=n;i++) { j=i; for(k=2;k<=i;k++) { while(j%k==0) { ++x[k]; j/=k; } } } printf("%2...
by problem
Wed Dec 10, 2003 10:52 am
Forum: Volume 100 (10000-10099)
Topic: 10014 - Simple calculations
Replies: 34
Views: 8454

[c] I use this formula.but why TLE.plz help me.my source code is in above. i increase array size to 1000000. a1=(a0+a2)/2-c1 2a1=a0+a2-2c1 4a1=2a0+2a2-4c1 ... (1) a2=(a1+a3)/2-c2 2a2=a1+a3-2c2 ... (2) Combine (1) & (2) 4a1=2a0+(a1+a3-2c2)-4c1 3a1=2a0+a3-2(c2+2c1) ... and so on until n-th term ... (n...
by problem
Tue Nov 25, 2003 12:11 pm
Forum: Volume 6 (600-699)
Topic: 621 - Secret Research
Replies: 45
Views: 18857

621 help me plz

seems very simple.but wa.i m frustrated.plz rescue me. [c] #include<stdio.h> #include<math.h> #include<string.h> #define max 10000 void main() { char t[max]; long int i,j,l; scanf("%ld",&j); for(l=0;l<=j;l++) { gets(t); i=strlen(t); if(t[0]=='1'&&t[1]=='9'&&t[2]=='0') printf("?\n"); if(t[i-1]=='5'&&...
by problem
Tue Nov 25, 2003 12:06 pm
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7470

357 help me plz

here is my code.wa.plz help me. [c] #include<stdio.h> #include<math.h> #define SIZE 5 #define SIZE1 7500 void main() { long int store[SIZE]={1,5,10,25,50}; long int count[SIZE1],inp; long int i,j,temp; while(scanf("%ld",&inp)==1) { if(inp==0) { printf("There is only 1 way to produce %ld cents change...
by problem
Tue Nov 25, 2003 11:51 am
Forum: Volume 4 (400-499)
Topic: 446 - Kibbles "n" Bits "n" Bits "n" Bits
Replies: 50
Views: 4625

446 wa plz help me.

why wa plz help me.here is my code. [c] #include<stdio.h> #include<string.h> #include<math.h> #include<ctype.h> binary(int sum) { int t[40]; int i=0,c; memset(t,0,30); while(sum>0) { t[i++]=fmod(sum,2)+48; sum=sum/2; } c=13-i-1; while(c>=0) { printf("0"); c--; } for(i=i-1;i>=0;i--) printf("%c",t ); ...
by problem
Tue Nov 25, 2003 11:49 am
Forum: Volume 100 (10000-10099)
Topic: 10014 - Simple calculations
Replies: 34
Views: 8454

10014

TLE plz give me correct solution. [c] #include<stdio.h> #include<math.h> void main() { int i,n,j,k; double a[10000]={0.0}; double sum=0.0; while(scanf("%d",&i)!=EOF) { for(j=0;j<n;j++) { scanf("%d",&n); for(k=0;k<n+2;k++) scanf("%lf",&a[k]); for(k=0;k<n;k++) sum=(sum+(a[k+2]*(n-k))); sum=((a[0]*n+a[...
by problem
Tue Nov 25, 2003 11:47 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 24629

160 wa help me plz

wa.think its very simple.every input output is ok.plz help me. [cpp] /* @JUDGE_ID: xxxxxx 160 C++ */ #include<stdio.h> int main() { long int i,j,n,k,p=0; static int x[100]; scanf("%ld",&n); while(n>0) { for(i=2;i<=n;i++) { j=i; for(k=2;k<=i;k++) { while(j%k==0) { ++x[k]; j/=k; } } } printf("%3ld! = ...

Go to advanced search