## Search found 4 matches

Tue Sep 04, 2007 12:08 am
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 36258
I have got WA several times,but could not find the error.Plz someone help me.... #include<stdio.h> #define M 60000 typedef long dt; dt as[M],sa[M],tuk[M]; void main() { dt cas=0,n,num,i,j,m,l,assa,sum,pre; while(scanf("%ld",&n)==1) { cas++; printf("Case #%ld:",cas); j=0; assa...
Mon Sep 03, 2007 11:54 pm
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 8975
Hi bappy i run your code on my machine and got some bugs.Some I/O do not match with my acc code.I am giving u those I/O Input : 1000 100 100000000 67779000 Output Of My Accepted Code : Original number was 1000 1000 - 1 = 999 999 - 999 = 0 0 - 0 = 0 Chain length 3 Original number was 100 100 - 1 = 99...
Mon Sep 03, 2007 11:33 pm
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 38198
Hi kana you should print a blank line between the output lines of two consecutive inputs.Here is an example for you.

Input :

Code: Select all

``````
2

2
+
3

3
*
4
``````
Output :

Code: Select all

``````23+

34*
``````
Hope it will work.Good Luck...
Sun Sep 02, 2007 11:10 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 27572
Hi shimon you should rather precalculate all primes instead of using your Isprime() so many times.You can use sieve method to determine all primes before you start taking input.Then just check through only the prime nubers.I hope it will work. Good Luck.