結果

問題 No.1231 Make a Multiple of Ten
ユーザー mlihua09mlihua09
提出日時 2020-09-18 21:30:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 926 ms
コンパイル使用メモリ 86,500 KB
実行使用メモリ 100,880 KB
最終ジャッジ日時 2023-09-05 18:09:14
合計ジャッジ時間 3,077 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
70,936 KB
testcase_01 AC 74 ms
71,116 KB
testcase_02 AC 74 ms
71,060 KB
testcase_03 AC 76 ms
71,056 KB
testcase_04 AC 129 ms
87,992 KB
testcase_05 AC 126 ms
86,668 KB
testcase_06 AC 106 ms
79,980 KB
testcase_07 AC 130 ms
89,232 KB
testcase_08 AC 112 ms
82,508 KB
testcase_09 AC 98 ms
78,536 KB
testcase_10 AC 127 ms
87,904 KB
testcase_11 AC 133 ms
89,736 KB
testcase_12 AC 169 ms
100,880 KB
testcase_13 AC 172 ms
99,992 KB
testcase_14 AC 73 ms
71,132 KB
testcase_15 AC 170 ms
99,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


N = int(input())

DP = [0] + [-N] * 9

for a in map(int, input().split()):
    a %= 10
    
    DP = [max(DP[i], DP[i - a] + 1) for i in range(10)]
    
print(DP[0])
0