結果

問題 No.889 素数!
コンテスト
ユーザー fV9TwBhUoa9S3eV
提出日時 2019-10-30 15:28:41
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 394 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 295 ms
コンパイル使用メモリ 21,536 KB
実行使用メモリ 15,996 KB
最終ジャッジ日時 2026-08-27 11:49:59
合計ジャッジ時間 8,727 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 59 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# No.889 素数!
n = int(input())

if n ** (1 / 2) == int(n ** (1 / 2)):
    print('Heihosu!')
elif n ** (1 / 3) == int(n ** (1 / 3)):
    print('Ripposu!')
else: 
    divisors = []
    for i in range(1, n):
        if n % i == 0:
            divisors.append(i)
    if sum(divisors) == n:
        print('Kanzensu!')
    elif len(divisors) == 1:
        print('Sosu!')
    else:
        print(n)
0