結果

問題 No.889 素数!
コンテスト
ユーザー tjake
提出日時 2019-09-20 21:35:53
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 399 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 381 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2026-04-04 13:48:23
合計ジャッジ時間 7,873 ms
ジャッジサーバーID
(参考情報)
judge5_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 59 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
for x in range(2, N):
    if N % x == 0:
        break
else:
    print("Sosu!")
    exit(0)
for x in range(2, N):
    if x*x == N:
        print("Heihosu!")
        exit(0)
for x in range(2, N):
    if x**3 == N:
        print("Ripposu!")
        exit(0)
c = 0
for i in range(1, N):
    if N % i == 0:
        c += i
if N > 0 and c == N:
    print("Kanzensu!")
    exit(0)
print(N)
0