結果
| 問題 | No.910 素数部分列 |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-02-27 13:12:00 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 474 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 11,776 KB |
| 最終ジャッジ日時 | 2026-09-15 20:02:29 |
| 合計ジャッジ時間 | 3,978 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 25 |
ソースコード
#!/usr/bin/env python3
# %%
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# %%
N = int(readline())
S = read().rstrip().decode()
# %%
S = S.replace('3', '')
S = S.replace('5', '')
S = S.replace('7', '')
answer = N - len(S)
# %%
N = len(S)
S = S.replace('19', '')
answer += (N - len(S)) // 2
x9 = S.count('9')
x1 = S.count('1')
n = min(x9 // 2, x1)
answer += n
x1 -= n
answer += x1 // 2
print(answer)
maspy