結果
| 問題 |
No.910 素数部分列
|
| コンテスト | |
| ユーザー |
nep_pudding3
|
| 提出日時 | 2019-10-18 23:09:38 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 372 bytes |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 12,740 KB |
| 最終ジャッジ日時 | 2024-06-25 18:59:26 |
| 合計ジャッジ時間 | 4,630 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 22 |
ソースコード
N = int(input())
S = list(input())
ans = 0
nine = 0
one = 0
for i in S:
if i in '357':
ans += 1
if i == '9':
if one >= 1:
ans += 1
one -= 1
else:
nine += 1
if i == '1':
if nine >= 2:
ans += 1
nine -= 2
else:
one += 1
ans += one//2
print(ans)
nep_pudding3