結果
| 問題 | No.889 素数! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-07 11:00:02 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 397 bytes |
| 記録 | |
| コンパイル時間 | 1,666 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2026-03-28 04:35:52 |
| 合計ジャッジ時間 | 6,836 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 61 |
ソースコード
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 and n:
return "Kanzensu!"
return n
n = int(input())
print(solve(n))