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 1636. Penalty Time

Where is the error ?? 9 test fails . Pascal . Где ошибка?? 9 тест не проходит. Паскаль.
Posted by Andriy 1 Nov 2014 13:10
var t1,t2,i,k,q:integer;
a:array [1..10000000] of integer;
begin
read(t1,t2);
for i:=1 to 10 do
        read(a[i]);
for i:=1 to 10 do
        begin
        if a[i]>0 then k:=k+a[i];
        end;
if t1<t2 then
        begin
        q:=(k*20)+t1;
        if q<=t2 then write('No chance.')
        else if q>t2 then write('Dirty debug :(');
        end
else if t1>=t2 then
        begin
        write('No chance.');
        end;
end.

Edited by author 01.11.2014 13:12

Edited by author 01.11.2014 13:12
Re: Where is the error ?? 9 test fails . Pascal . Где ошибка?? 9 тест не проходит. Паскаль.
Posted by IlushaMax 25 Mar 2016 20:56
Why SUCH BIG MASSIVE if 10 elements will be used
Re: Where is the error ?? 9 test fails . Pascal . Где ошибка?? 9 тест не проходит. Паскаль.
Posted by ToadMonster 26 Mar 2016 02:41
What is "k" initial value?