Submission #165580

# Submission time Handle Problem Language Result Execution time Memory
165580 2019-11-27T13:19:29 Z boolodifjenula Timovi (COCI18_timovi) Python 3
40 / 80
1000 ms 6052 KB
N,K,M=map(int,input().split())
L=N*[0]
i=-1
k=1
while M>0:
    if k: i+=1
    else: i-=1
    if M>K:
        L[i]+=K
        M-=K
    else:
        L[i]+=M
        M=0
        break
    if i==N-1:
        k=0
    if i==0:
        k=1
for j in range(N): print(L[j],end=" ")
        
    
# Verdict Execution time Memory Grader output
1 Correct 26 ms 3300 KB Output is correct
2 Correct 26 ms 3300 KB Output is correct
3 Correct 310 ms 6052 KB Output is correct
4 Correct 290 ms 5996 KB Output is correct
5 Execution timed out 1044 ms 3428 KB Time limit exceeded
6 Execution timed out 1067 ms 3300 KB Time limit exceeded
7 Execution timed out 1076 ms 4792 KB Time limit exceeded
8 Execution timed out 1064 ms 4920 KB Time limit exceeded