ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1012. K-based Numbers. Version 2

Why I got WA?
Posted by Bill@sxyz 29 Jul 2003 08:14
program ural_1012;
 var
  a1,a0,p:longint;
  n,k,i:integer;
 begin
  readln(n,k);
  a1:=k-1;
  for i:=2 to n do
   begin
    p:=a1;
    a1:=(a1+a0)*(k-1);
    a0:=p;
   end;
   writeln(a1+a0);
 end.
Re: Why I got WA?
Posted by cs 21 Jul 2007 16:47
Because you are very ugly!
                ~~~~

Edited by author 21.07.2007 16:48