結果

問題 No.889 素数!
ユーザー dangodango
提出日時 2023-06-07 21:18:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 803 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 71,948 KB
最終ジャッジ日時 2023-08-28 18:29:41
合計ジャッジ時間 6,994 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,500 KB
testcase_01 AC 67 ms
71,868 KB
testcase_02 AC 67 ms
71,696 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 68 ms
71,224 KB
testcase_06 AC 68 ms
71,592 KB
testcase_07 AC 68 ms
71,580 KB
testcase_08 AC 67 ms
71,812 KB
testcase_09 WA -
testcase_10 AC 68 ms
71,512 KB
testcase_11 AC 67 ms
71,896 KB
testcase_12 AC 68 ms
71,924 KB
testcase_13 AC 67 ms
71,492 KB
testcase_14 AC 68 ms
71,860 KB
testcase_15 AC 67 ms
71,852 KB
testcase_16 AC 68 ms
71,884 KB
testcase_17 AC 79 ms
71,512 KB
testcase_18 AC 67 ms
71,512 KB
testcase_19 AC 68 ms
71,492 KB
testcase_20 AC 67 ms
71,696 KB
testcase_21 AC 67 ms
71,776 KB
testcase_22 AC 67 ms
71,896 KB
testcase_23 AC 68 ms
71,776 KB
testcase_24 AC 67 ms
71,424 KB
testcase_25 AC 67 ms
71,440 KB
testcase_26 AC 68 ms
71,360 KB
testcase_27 AC 67 ms
71,496 KB
testcase_28 AC 67 ms
71,780 KB
testcase_29 WA -
testcase_30 AC 68 ms
71,860 KB
testcase_31 AC 67 ms
71,692 KB
testcase_32 AC 68 ms
71,504 KB
testcase_33 AC 67 ms
71,820 KB
testcase_34 AC 68 ms
71,364 KB
testcase_35 AC 68 ms
71,880 KB
testcase_36 AC 68 ms
71,584 KB
testcase_37 AC 68 ms
71,640 KB
testcase_38 AC 67 ms
71,800 KB
testcase_39 AC 67 ms
71,736 KB
testcase_40 AC 67 ms
71,508 KB
testcase_41 AC 67 ms
71,948 KB
testcase_42 AC 67 ms
71,632 KB
testcase_43 AC 68 ms
71,588 KB
testcase_44 AC 68 ms
71,644 KB
testcase_45 AC 70 ms
71,636 KB
testcase_46 AC 68 ms
71,480 KB
testcase_47 AC 69 ms
71,448 KB
testcase_48 AC 68 ms
71,580 KB
testcase_49 AC 67 ms
71,908 KB
testcase_50 AC 67 ms
71,364 KB
testcase_51 AC 67 ms
71,744 KB
testcase_52 AC 68 ms
71,908 KB
testcase_53 AC 66 ms
71,448 KB
testcase_54 AC 66 ms
71,896 KB
testcase_55 AC 71 ms
71,736 KB
testcase_56 AC 67 ms
71,504 KB
testcase_57 AC 66 ms
71,512 KB
testcase_58 AC 67 ms
71,860 KB
testcase_59 AC 68 ms
71,640 KB
testcase_60 AC 68 ms
71,504 KB
testcase_61 AC 68 ms
71,708 KB
testcase_62 AC 67 ms
71,804 KB
testcase_63 AC 68 ms
71,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def ISPRIME(N):
    if N < 2:
        return False
    elif N == 2:
        return True
    elif N % 2 == 0:
        return False
    else:
        for i in range(3, int(N ** 0.5) + 1):
            if N % i == 0:
                return False
    return True

def ISSQUARE(N):
    return float(N ** 0.5).is_integer()

def ISCUBIC(N):
    return float(N ** (1 / 3)).is_integer()

def ISPERFECT(N):
    divisors = []
    for i in range(1, N + 1):
        if N % i == 0:
            divisors.append(N)
            divisors.append(int(N / i))
    return sum(list(set(divisors))[0:len(list(set(divisors))) - 1]) == N

N = int(input())
if ISPRIME(N):
    print("Sosu!")
elif ISSQUARE(N):
    print("Heihosu!")
elif ISCUBIC(N):
    print("Ripposu!")
elif ISPERFECT(N):
    print("Kanzensu!")
else:
    print(N)
0