結果

問題 No.1231 Make a Multiple of Ten
ユーザー _matumo__matumo_
提出日時 2020-12-14 12:11:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,035 ms / 2,000 ms
コード長 162 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 11,824 KB
実行使用メモリ 26,016 KB
最終ジャッジ日時 2023-10-20 04:57:06
合計ジャッジ時間 8,376 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,992 KB
testcase_01 AC 28 ms
9,992 KB
testcase_02 AC 29 ms
9,992 KB
testcase_03 AC 31 ms
9,992 KB
testcase_04 AC 496 ms
17,040 KB
testcase_05 AC 428 ms
16,136 KB
testcase_06 AC 185 ms
12,240 KB
testcase_07 AC 504 ms
17,612 KB
testcase_08 AC 297 ms
14,564 KB
testcase_09 AC 115 ms
11,320 KB
testcase_10 AC 447 ms
16,712 KB
testcase_11 AC 532 ms
17,960 KB
testcase_12 AC 971 ms
25,008 KB
testcase_13 AC 1,035 ms
25,900 KB
testcase_14 AC 29 ms
9,992 KB
testcase_15 AC 1,023 ms
26,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
P=[int(s[-1]) for s in input().split()]
v=[1]+[0]*9
for d in P:
    w=v[-d:]+v[:-d]
    v=[[a,max(a,b+1)][b>0] for a,b in zip(v,w)]
print(v[0]-1)

0