結果
| 問題 | No.1747 Many Formulae 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-02 12:35:35 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 108 ms / 2,000 ms |
| コード長 | 298 bytes |
| 記録 | |
| コンパイル時間 | 501 ms |
| コンパイル使用メモリ | 20,596 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-03-04 11:21:41 |
| 合計ジャッジ時間 | 3,058 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#yuki1747
def isprime(x):
if x==1:
return 0
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+=isprime(eval(''.join(t)))
print(res)