## Search found 7 matches

Thu Nov 21, 2002 1:43 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 30961
Maybe you can replace '/2' and '%2' with shift operator '>>' for higher
efficiency.
Wed Oct 09, 2002 3:49 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 19171

### 412

the problem insist that answers must be rounded to six digits after the decimal point. If the answer we have is 2.44949 what value we have to output? 2.44949 or 2.449490? And I don't know why W.A occurs at all... #include <iostream.h> #include <math.h> #include <iomanip.h> int GCD(int a,int b){ whil...
Wed Oct 09, 2002 3:20 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 33720
anybody......please tell me why it comes with "TimeLimitExceeded" ? #include <stdio.h> #include <iostream.h> #include <string.h> void reverse(char *s){ int i; char t[10000]; memset(t,0,10000); for(i=0;i<strlen(s);i++) t[strlen(s)-1-i]=s[i]; strcpy(s,t); return; } void BIGSUM(char *a,char *b){ int i,...
Fri Oct 04, 2002 6:56 am
Forum: Volume 2 (200-299)
Topic: 256 - Quirksome Squares
Replies: 30
Views: 5146

### 256..............another piece of cake?

P256 Quirksome Squares find the number with the following property: 3025=(30+25)^2 The number of digits may be 2,4,6 or 8. The maxint is only 32767 and numbers of eight digits are asked for. Please note that the number of digits in the output is equal to the number in the corresponding input line : ...
Mon Sep 30, 2002 2:21 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 30961

### OH CRAP!

your method is too slow .............and "TIMELIMITEXCEEDED" is happened

OH! CRAP~~~~~~
Tue Sep 17, 2002 4:58 am
Forum: Volume 3 (300-399)
Topic: 358 - Don't Have A Cow
Replies: 52
Views: 11342
NEVER GIVE UP !
Mon Sep 16, 2002 7:45 am
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 13053

### P374 >>>Time Limit Exceed........How could it be???

I think my method is fast enough.......... However........It arise "TimeLimitExceeded" Anybody knows why??? My idea is: 5^100 mod 26 =((5^3)^33)*(5^1) mod 26 = ((5^3 mod 26)^33)*(5^1 mod 26) mod 26 =(21^33)*5 mod 26 =X^Y*Z mod 26 ............etc Repeat until X^Y<26 and Z<26 Then directly calculate ...