結果

問題 No.1935 Water Simulation
ユーザー Eki1009Eki1009
提出日時 2022-05-13 21:26:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 1,201 ms
コンパイル使用メモリ 86,640 KB
実行使用メモリ 76,136 KB
最終ジャッジ日時 2023-09-29 09:56:01
合計ジャッジ時間 4,717 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,324 KB
testcase_01 AC 86 ms
75,908 KB
testcase_02 AC 81 ms
75,856 KB
testcase_03 AC 82 ms
76,048 KB
testcase_04 AC 82 ms
75,808 KB
testcase_05 AC 81 ms
75,896 KB
testcase_06 AC 81 ms
76,060 KB
testcase_07 AC 81 ms
76,032 KB
testcase_08 AC 85 ms
75,928 KB
testcase_09 AC 83 ms
76,080 KB
testcase_10 AC 82 ms
75,996 KB
testcase_11 AC 83 ms
76,020 KB
testcase_12 AC 81 ms
75,844 KB
testcase_13 AC 80 ms
76,012 KB
testcase_14 AC 80 ms
76,008 KB
testcase_15 AC 82 ms
76,060 KB
testcase_16 AC 81 ms
75,804 KB
testcase_17 AC 79 ms
75,952 KB
testcase_18 AC 78 ms
75,912 KB
testcase_19 AC 83 ms
76,000 KB
testcase_20 AC 82 ms
76,136 KB
testcase_21 AC 82 ms
75,972 KB
testcase_22 AC 83 ms
76,104 KB
testcase_23 AC 82 ms
75,884 KB
testcase_24 AC 81 ms
75,912 KB
testcase_25 AC 84 ms
75,920 KB
testcase_26 AC 81 ms
75,944 KB
testcase_27 AC 82 ms
76,044 KB
testcase_28 AC 82 ms
75,844 KB
testcase_29 AC 73 ms
71,228 KB
testcase_30 AC 74 ms
71,280 KB
testcase_31 AC 81 ms
75,844 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