結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2020-08-05 09:53:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,679 ms / 5,000 ms |
コード長 | 450 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-15 23:31:25 |
合計ジャッジ時間 | 21,834 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
def yakusu(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] N=int(input()) L=yakusu(N) if len(L)>4: print("YES") elif len(L)==4: if N==L[1]**3: print("YES") else: print("NO") else: print("NO")