結果
問題 | No.889 素数! |
ユーザー |
|
提出日時 | 2022-05-07 10:58:46 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 142 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-07-06 14:53:36 |
合計ジャッジ時間 | 3,651 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 60 WA * 1 |
ソースコード
def solve(n): s = set() for i in range(2,n+1): if n%i: continue if i**2 == n: return "Heihosu!" if i**3 == n: return "Ripposu!" if i == n and len(s) == 0: return "Sosu!" s.add(n//i) s.add(i) if sum(s) == n*2: return "Kanzensu!" return n n = int(input()) print(solve(n))