結果
| 問題 | No.1747 Many Formulae 2 |
| コンテスト | |
| ユーザー |
nok0
|
| 提出日時 | 2021-11-10 23:42:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 348 bytes |
| 記録 | |
| コンパイル時間 | 410 ms |
| コンパイル使用メモリ | 82,324 KB |
| 実行使用メモリ | 68,932 KB |
| 最終ジャッジ日時 | 2024-12-31 18:42:31 |
| 合計ジャッジ時間 | 1,968 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 1 |
ソースコード
def is_prime(x):
for i in range(2, int(x ** 0.5) + 1):
if x % i == 0:
return 0
return 1
res = 0
s = input()
n = len(s)
for b in range(1 << (n - 1)):
t = []
for i in range(n):
t.append(s[i])
if i < n - 1 and b >> i & 1:
t.append('+')
res += is_prime(eval(''.join(t)))
print(res)
nok0