結果
| 問題 |
No.889 素数!
|
| コンテスト | |
| ユーザー |
s_shohei
|
| 提出日時 | 2020-04-13 23:20:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 525 bytes |
| コンパイル時間 | 391 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,608 KB |
| 最終ジャッジ日時 | 2024-10-01 05:22:48 |
| 合計ジャッジ時間 | 4,544 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 59 WA * 2 |
ソースコード
n=int(input())
def m_div(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return sum(divisors[:-1])
if n==8 or n==27:
print("Ripposu!")
elif n==4 or n==9 or n==16 or n==25 or n==36 or n==49:
print("Heihosu!")
elif m_div(n)==n:
print("Kanzensu!")
else:
for i in range(2,n):
if n%i==0:
print(n)
exit()
print("Sosu!")
s_shohei