Search found 4 matches

by Sohel_Cuet
Tue Sep 04, 2007 12:08 am
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 32232

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=0; m=0; scanf("%ld",&tu...
by Sohel_Cuet
Mon Sep 03, 2007 11:54 pm
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 7915

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...
by Sohel_Cuet
Mon Sep 03, 2007 11:33 pm
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 35006

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... :D
by Sohel_Cuet
Sun Sep 02, 2007 11:10 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 24215

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.:D

Go to advanced search