結果
| 問題 | No.889 素数! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-07 10:57:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 375 bytes |
| 記録 | |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 82,220 KB |
| 実行使用メモリ | 54,024 KB |
| 最終ジャッジ日時 | 2024-07-06 14:52:48 |
| 合計ジャッジ時間 | 4,139 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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!"
s.add(n//i)
s.add(i)
if sum(s) == n*2:
return "Kanzensu!"
if sum(s) == n+1:
return "Sosu!"
return n
n = int(input())
print(solve(n))