結果

問題 No.1231 Make a Multiple of Ten
ユーザー IH
提出日時 2020-09-20 20:45:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 82,152 KB
実行使用メモリ 848,940 KB
最終ジャッジ日時 2024-06-24 10:57:02
合計ジャッジ時間 4,253 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 2
other WA * 1 MLE * 1 -- * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
a.sort()
i = 0
s = 0
ans = []
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