|
|
back to boardWhat's wrong with my solution? Posted by HELLER 23 Apr 2002 20:06 My solution in pseudo code: res:=0; for k:=2 to 23 (every k is prime) do a:=amount of numbers i (2<=i<=S),that i%k==0; b:=amount of numbers i (2<=i<=S), that i%n==0 , where n - any prime less than k if (a>=K) res+=Combinations(a,K); if (b>=K) res-=Combinations(b,K); if (res>=10000) then ... end write(res) ... WA, and I dont know why. My prog gives right answer on tests written here and in sample input, but WA. Help, please |
|
|