結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2016-12-16 17:34:01 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 1,446 ms / 5,000 ms |
コード長 | 288 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-06-27 00:52:59 |
合計ジャッジ時間 | 7,430 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
n=int(raw_input()) isValid=False d={} c=0 while True: if n%2==1: break c+=1 n/=2 if c>0: d[2]=c i=3 while i**2<=n: c=0 while True: if n%i!=0: break c+=1 n/=i if c>0: d[i]=c i+=2 if n>1: d[n]=1 count = sum(d.values()) if count>=3: print "YES" else: print "NO"