結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,056 KB
testcase_01 AC 28 ms
10,056 KB
testcase_02 AC 27 ms
10,056 KB
testcase_03 AC 29 ms
10,056 KB
testcase_04 AC 485 ms
17,104 KB
testcase_05 AC 425 ms
16,200 KB
testcase_06 AC 186 ms
12,304 KB
testcase_07 AC 512 ms
17,676 KB
testcase_08 AC 308 ms
14,628 KB
testcase_09 AC 124 ms
11,384 KB
testcase_10 AC 460 ms
16,776 KB
testcase_11 AC 551 ms
18,024 KB
testcase_12 AC 990 ms
25,072 KB
testcase_13 AC 1,044 ms
25,964 KB
testcase_14 AC 28 ms
10,056 KB
testcase_15 AC 1,045 ms
26,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
P=[int(s)%10 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