Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | What is TEST#18 | Bunyodbek Bobodjanov (TATU UF) | 1295. Бред | 3 ноя 2009 15:13 | 4 | I can't understand Why I got "Wrong Answer" in TEST#18......? Give me some tests !!!!! This is my code.--- int n = in.nextInt(); boolean f =true; if((n+1)%4==0){ System.out.print("2"); f = false; } else if(n%4==0) { System.out.print("0"); f = false; } if(f) System.out.print("1"); I have the problem like yours. I have got WA in TEST#18 too. | After rejudge | Alexss | 1295. Бред | 11 июн 2009 02:40 | 2 | After rejudge bruteforce algo rules ;-) You can use O(logn) calculating of power. | SEE MY SOLUTION OF THIS INTERESTING PROBLEM! | Gerasim Petrov Velchev | 1295. Бред | 10 авг 2008 00:20 | 2 | #include<iostream> using namespace std; int main () { int period[20]={ 1, 1, 2, 0, 2, 1, 2, 0, 1, 1,2,0,1,1,2,0,1,1,2,0}; int n; cin>>n; cout<<period[((n%20)?n%20:20)-1]<<endl;; system ("pause"); return 0; } Do you really think that we need this one? BF 4ever... | Problem 1295 "Crazy notions" has been rejudged (+) | Sandro (USU) | 1295. Бред | 13 май 2008 14:39 | 1 | New tests were added. 517 authors lost AC verdict. Thanks to yujj. | Output | Mihut Bogdan | 1295. Бред | 17 дек 2007 13:35 | 2 | Output Mihut Bogdan 17 дек 2007 03:45 I really think that the statement for output should be written in english. Re: Output Alias (Alexander Prudaev) 17 дек 2007 13:35 it is really funny) in the output must be one number - the amount of zeros in the end decimal notation of given expression. see in statement "With how mach zeros ends its decimal notation?" and you must output this amount | WA14??? | naTural | 1295. Бред | 21 ноя 2007 11:18 | 1 | can someone give me tests to compile my programm? | Compilation Error (C#) | Black^n^White | 1295. Бред | 27 авг 2007 15:34 | 4 | It runs well on MS Visual C# 2005, but here i get CE using System; using System.Text; class Program { static void Main() { ulong n = ulong.Parse(Console.ReadLine()); ulong sum = 1; ulong ans = 0; ulong a = 2, b = 3, c = 4; ulong a1 = 1, b1 = 1, c1 = 1; for (ulong i = 1; i <= n; ++i) { a1 *= a; a1 %= 1000; b1 *= b; b1 %= 1000; c1 *= c; c1 %= 1000; } sum += a1 + b1 + c1; while (true) { if ((sum % 10) == 0) { ans++; } else { Console.WriteLine(ans); break; } sum /= 10; } } } Edited by author 30.01.2007 15:26 Say you what you write on c# Edited by author 21.03.2007 14:23 Really compilation error? I sent your solution for problem 1000 and it was compiled (I got crash on 1 test). Be sure that you selected correct langyage during submitting Edited by author 21.03.2007 16:47 man put instead of true sum != 0 | wa test 6 | Nikita | 1295. Бред | 15 май 2007 22:59 | 1 | | I got AC!!! | Kornilenko Leonid (KHAI) | 1295. Бред | 25 фев 2007 23:00 | 2 | Problem is VERY easy =) I get AC on 0.001s and 104Kb. Who can faster? My prog use only 1 variable and got AC int 0.001 and 104 kb memory, so I'm the same with you)) Edited by author 25.02.2007 23:08 | AC 0.015, 130 (C++) | Katy | 1295. Бред | 9 июл 2006 23:47 | 1 | You need the period of 8 length. I used a "BRUT" programm - it was quite funny;-) | 0.015 and 186 | Sadvakasov Aslan (OKTL) | 1295. Бред | 25 янв 2006 23:46 | 2 | | HELP WA#7 | ZiV | 1295. Бред | 9 янв 2006 03:00 | 2 | Edited by author 08.01.2006 19:41 Check first 20 values of N... If it doesn't help check solution :) | This problem is simple, by WHY DOESN'T MY PERIOD WORK?! WA#4 | Alexey | 1295. Бред | 10 окт 2005 00:37 | 2 | Const period:array[0..19] of byte=(2,1,2,0,1,1,2,0,1,1,2,0,1,1,2,0,1,1,2,0); Edited by author 10.10.2005 00:38 Sorry, I found my stupid mistake. | Why WA on test 8? | ss | 1295. Бред | 26 мар 2005 22:57 | 3 | My code: --------------------------------- |const a:array[1..20]of integer = (2,1,2,0,1,1,2,0,1,1,2,0,1,1,2,0,1,1,2,0); | |var n:integer; | |begin | readln(n); | | if n=1 then writeln(1) else | if n=2 then writeln(1) else | if n=3 then writeln(2) else | if n=4 then writeln(0) | else begin | n:=(n mod 20)-4 ; | writeln(a[n]); | end; |end. I used my AC program (who is actually brute force, keeping the last 3 digits) and for 101 yours outputs 0 and mine 1... | I know the solution!! | luke415 | 1295. Бред | 30 мар 2004 11:32 | 1 | Begging it divideds by with 8 of remainder, have the regulation |
|
|