結果

問題 No.1231 Make a Multiple of Ten
ユーザー 👑 H20H20
提出日時 2020-11-06 09:31:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 361 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 120,708 KB
最終ジャッジ日時 2023-09-29 17:39:11
合計ジャッジ時間 5,749 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split())) 
TEN = [[0] * 10 for i in range(N+1)]
for i in range(N):
    a = A[i]%10
    for j in range(10):
        if TEN[i][j]!=0 or j==0:
            TEN[i+1][(j+a)%10] = max(TEN[i+1][(j+a)%10] ,TEN[i][j]+1)
            print('aaaa')
        else:
            TEN[i+1][(j+a)%10] = TEN[i][(j+a)%10]
 
print(TEN[N][0])
0