## Search found 63 matches

Sun Nov 04, 2007 4:10 am
Forum: Volume 9 (900-999)
Topic: 993 - Product of digits
Replies: 19
Views: 12509
I got AC...

Here is some I/O:
Input:

Code: Select all

``````5
0
1
17
34
22
``````
Output:

Code: Select all

``````10
1
-1
-1
-1
``````

It may be help...
Sat Nov 03, 2007 2:31 am
Forum: Volume 9 (900-999)
Topic: 944 - Happy Numbers
Replies: 20
Views: 13009

### Description

Input

The input has two lines which contain a positive integer between 1 and 99999 each; the first integer, L, is the low limit of the closed interval; the second one, H, is the high limit

why multiple i/o??
Sun Aug 19, 2007 1:55 pm
Forum: Volume 101 (10100-10199)
Topic: 10101 - Bangla Numbers
Replies: 122
Views: 29290

### WA

I got PE some month ago..

But i lost my code...

try to solve by recursion but WA.
plz help..

here is my code:

Code: Select all

``````Remove after AC :)
I have a silly mistake....:(
``````

Thu Aug 02, 2007 5:09 am
Forum: Volume 112 (11200-11299)
Topic: 11247 - Income Tax
Replies: 50
Views: 21208
what's the output for input: 51 2
is it: 51?????
Sun Apr 01, 2007 7:14 pm
Forum: Volume 102 (10200-10299)
Topic: 10293 - Word Length and Frequency
Replies: 18
Views: 8028
Need more IO...

I Got PE .....

Wed Mar 28, 2007 5:26 pm
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 24121
I don't understand where is the problem finding distance

T[j] contains sq of distance

so in FW T[j] update by b and c in the following way:
first distance is sqrt(b)
second distance is sqrt(c)

so (sqrt(b)+sqrt(c))^2 = b + c + 2*sqrt(b*c)

what's the Wrong........
Wed Mar 28, 2007 4:42 pm
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 24121
Still WA.......................

Min() Fuction is defined same way as previous......
bcaz T[j] is distance^2

So T[j] = Min(T[j],(T[k]+T[k][j])) is not true here.....
Wed Mar 28, 2007 4:33 pm
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 24121
What's the problem here???

Any problem within the loops???
Tue Mar 27, 2007 4:37 pm
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 24121

I got WA.... Here is my code: #include<stdio.h> #include<math.h> #define INF 100000 double T[105][105]; double Min(double a, double b, double c) { if(a>(b+c+2*sqrt(b*c))) return (b+c+2*sqrt(b*c)); return a; } int Dis(int a,int b, int c, int d) { return ((a-c)*(a-c)+(b-d)*(b-d)); } int main() { int n...
Wed Sep 06, 2006 9:49 pm
Forum: Volume 110 (11000-11099)
Topic: 11063 - B2-Sequence
Replies: 73
Views: 40654

### Acc

Thanks to Erik

But why you don't print a blank line after case 16.
Wed Sep 06, 2006 9:11 pm
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 15930

### AC

I got AC.
I have a stupid mistake......
Thanks to all.
Wed Sep 06, 2006 8:53 pm
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 15930

### 10125 WAAAAAAAAAAA

Please gime me some I/O: For my worng code:: Input: 5 2 3 5 7 12 5 2 16 64 256 1024 5 1 2 3 4 5 5 5 4 3 2 1 10 1 1 1 1 1 1 1 1 1 1 1 5 2 5 6 3 5 6 7 4 5 6 7 8 4 6 3 2 1 5 -8 4 10 11 14 4 -1 0 1 0 0 WA Output:: 12 no solution no solution no solution no solution no solution all Output is correct ( aft...
Mon Sep 04, 2006 11:12 pm
Forum: Volume 110 (11000-11099)
Topic: 11063 - B2-Sequence
Replies: 73
Views: 40654

### WA

what is the worng : input: 4 1 2 3 3 4 15 16 17 18 4 -5 0 5 9 6 1 9 19 0 45 70 6 1 9 19 45 70 150 5 15 16 -1 17 18 4 2 2 2 3 4 2 2 2 2 4 1 9 18 36 5 1 9 10 18 36 5 20 30 40 50 60 3 1 3 5 6 2 6 3 2 6 3 2 2 2 3 1 3 5 3 0 1 3 Output: Case #1: It is not a B2-Sequence. Case #2: It is not a B2-Sequence. C...
Sun Sep 03, 2006 6:56 pm
Forum: Volume 102 (10200-10299)
Topic: 10299 - Relatives
Replies: 57
Views: 14674
Ok I got AC
i have a mistake

thanks to all
Sun Sep 03, 2006 6:38 pm
Forum: Volume 102 (10200-10299)
Topic: 10299 - Relatives
Replies: 57
Views: 14674

### Tell me the Algo:

I also got TLE. My algorithm: a> generate prime number using seive up to lim = sqrt(1,00,000,000) b> take an input N c> res = 0 d> for i = 2,3,4,5,........lim. check if i is prime and N%i==0 d.1> res = res/i*(i-1) d.2> do until N%i!=0 N/=i e> if N not equal to 1 then res = res/n*(n-1); f> print res ...