結果

問題 No.1231 Make a Multiple of Ten
ユーザー IHIH
提出日時 2020-09-20 20:47:01
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 220 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 916,456 KB
最終ジャッジ日時 2023-09-06 16:32:22
合計ジャッジ時間 5,129 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
a.sort()
i = 0
s = 0
ans = [0]
while True:
  if i == n-1:
    break
  else:
    s += a[i]
    if s % 10 == 0:
      ans.append(i)
    else:
      i += 1
print(max(ans))
0