結果
問題 | No.1747 Many Formulae 2 |
ユーザー |
|
提出日時 | 2022-02-02 12:35:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 298 bytes |
コンパイル時間 | 73 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-11 09:20:50 |
合計ジャッジ時間 | 1,183 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)