|
|
вернуться в форумI got AC with a program which has only 6 lines. I don't believe!! var n,i:longint; begin readln(n); if n>=1 then writeln((n+1)*n div 2) else writeln((n+1)*(2-n) div 2); end. Oh, you are great programmer! Re: Oh, you are great programmer! It is a sum of arifmetical progression! Re: Oh, you are great programmer! Thank you very much!! Re: I got AC with a program which has only 6 lines. U are verry-verry clever person!!! Nothing special. Everybody can see that. And I can reduce the length of prog by 1 byte(+) change n>=1 into n>0 :) -_- so what,,, I did it in 3 lines. Re: I got AC with a program which has only 6 lines. Послано Lunar 19 июл 2006 06:41 I think one line is OK. Re: I got AC with a program which has only 6 lines. Послано javran 14 окт 2006 13:38 it is very good. |
|
|