結果

問題 No.1935 Water Simulation
ユーザー Eki1009Eki1009
提出日時 2022-05-13 21:26:09
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 556 ms
使用メモリ 80,840 KB
最終ジャッジ日時 2023-02-21 18:41:40
合計ジャッジ時間 4,951 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 80 ms
75,744 KB
testcase_01 AC 89 ms
80,372 KB
testcase_02 AC 83 ms
80,708 KB
testcase_03 AC 87 ms
80,348 KB
testcase_04 AC 88 ms
80,480 KB
testcase_05 AC 85 ms
80,524 KB
testcase_06 AC 82 ms
80,512 KB
testcase_07 AC 85 ms
80,612 KB
testcase_08 AC 89 ms
80,684 KB
testcase_09 AC 88 ms
80,476 KB
testcase_10 AC 86 ms
80,652 KB
testcase_11 AC 86 ms
80,476 KB
testcase_12 AC 82 ms
80,840 KB
testcase_13 AC 82 ms
80,336 KB
testcase_14 AC 81 ms
80,516 KB
testcase_15 AC 86 ms
80,288 KB
testcase_16 AC 88 ms
80,680 KB
testcase_17 AC 83 ms
80,408 KB
testcase_18 AC 81 ms
80,420 KB
testcase_19 AC 86 ms
80,444 KB
testcase_20 AC 84 ms
80,668 KB
testcase_21 AC 84 ms
80,652 KB
testcase_22 AC 86 ms
80,416 KB
testcase_23 AC 81 ms
80,796 KB
testcase_24 AC 82 ms
80,408 KB
testcase_25 AC 89 ms
80,672 KB
testcase_26 AC 82 ms
80,344 KB
testcase_27 AC 82 ms
80,620 KB
testcase_28 AC 83 ms
80,428 KB
testcase_29 AC 76 ms
75,720 KB
testcase_30 AC 76 ms
75,476 KB
testcase_31 AC 84 ms
80,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

*L,n = map(int,input().split())
C = [L[0],0,0,0]
m = min(n,10**5)
n -= m
n %= 4
for i in range(m+n):
  m = min(C[i%4],L[(i+1)%4]-C[(i+1)%4])
  C[i%4] -= m
  C[(i+1)%4] += m
print(*C)
0