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 1219. Symbolic Sequence

Why I got WA?????????????
Posted by i love c++ 18 Mar 2003 18:03
var
  i,j,k:char;
  s:longint;
begin
  s:=0;
  for i:='a' to 'z' do
  for j:='a' to 'z' do
  for k:='a' to 'z' do
  begin
    write(i);inc(s);if(s>=1000000)then begin writeln;exit;end;
    write(j);inc(s);if(s>=1000000)then begin writeln;exit;end;
    write(k);inc(s);if(s>=1000000)then begin writeln;exit;end;
  end;
end.
Re: Why I got WA?????????????
Posted by i love c++ 18 Mar 2003 18:40
sorry,i know what's wrong with me!i've Ac!!!!!!!!!
if you want to know how to slove it,please send e-mail to me!
My e-mail is whyzhc@sohu.com

> var
>   i,j,k:char;
>   s:longint;
> begin
>   s:=0;
>   for i:='a' to 'z' do
>   for j:='a' to 'z' do
>   for k:='a' to 'z' do
>   begin
>     write(i);inc(s);if(s>=1000000)then begin writeln;exit;end;
>     write(j);inc(s);if(s>=1000000)then begin writeln;exit;end;
>     write(k);inc(s);if(s>=1000000)then begin writeln;exit;end;
>   end;
> end.