結果

問題 No.889 素数!
ユーザー tter4tter4
提出日時 2019-09-20 23:15:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 601 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 71,984 KB
最終ジャッジ日時 2023-10-12 21:47:03
合計ジャッジ時間 7,535 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,684 KB
testcase_01 AC 72 ms
71,984 KB
testcase_02 AC 74 ms
71,604 KB
testcase_03 WA -
testcase_04 AC 73 ms
71,348 KB
testcase_05 AC 75 ms
71,904 KB
testcase_06 AC 74 ms
71,692 KB
testcase_07 AC 74 ms
71,536 KB
testcase_08 AC 73 ms
71,800 KB
testcase_09 AC 72 ms
71,608 KB
testcase_10 AC 74 ms
71,632 KB
testcase_11 AC 72 ms
71,876 KB
testcase_12 AC 74 ms
71,608 KB
testcase_13 AC 73 ms
71,748 KB
testcase_14 AC 74 ms
71,800 KB
testcase_15 AC 73 ms
71,696 KB
testcase_16 AC 74 ms
71,888 KB
testcase_17 AC 74 ms
71,984 KB
testcase_18 AC 75 ms
71,812 KB
testcase_19 AC 73 ms
71,760 KB
testcase_20 AC 72 ms
71,884 KB
testcase_21 AC 74 ms
71,696 KB
testcase_22 AC 75 ms
71,732 KB
testcase_23 AC 73 ms
71,860 KB
testcase_24 AC 73 ms
71,924 KB
testcase_25 AC 74 ms
71,808 KB
testcase_26 AC 72 ms
71,760 KB
testcase_27 AC 73 ms
71,804 KB
testcase_28 AC 74 ms
71,872 KB
testcase_29 AC 73 ms
71,524 KB
testcase_30 AC 74 ms
71,684 KB
testcase_31 AC 72 ms
71,748 KB
testcase_32 AC 73 ms
71,632 KB
testcase_33 AC 71 ms
71,832 KB
testcase_34 AC 73 ms
71,804 KB
testcase_35 AC 73 ms
71,500 KB
testcase_36 AC 71 ms
71,756 KB
testcase_37 AC 73 ms
71,868 KB
testcase_38 AC 74 ms
71,840 KB
testcase_39 AC 73 ms
71,716 KB
testcase_40 AC 72 ms
71,812 KB
testcase_41 AC 72 ms
71,908 KB
testcase_42 AC 73 ms
71,676 KB
testcase_43 AC 73 ms
71,704 KB
testcase_44 AC 73 ms
71,536 KB
testcase_45 AC 72 ms
71,556 KB
testcase_46 AC 72 ms
71,692 KB
testcase_47 AC 73 ms
71,804 KB
testcase_48 AC 74 ms
71,760 KB
testcase_49 AC 73 ms
71,928 KB
testcase_50 AC 71 ms
71,924 KB
testcase_51 AC 71 ms
71,800 KB
testcase_52 AC 73 ms
71,552 KB
testcase_53 AC 77 ms
71,956 KB
testcase_54 AC 72 ms
71,876 KB
testcase_55 AC 73 ms
71,608 KB
testcase_56 AC 73 ms
71,560 KB
testcase_57 AC 72 ms
71,732 KB
testcase_58 AC 73 ms
71,808 KB
testcase_59 AC 75 ms
71,528 KB
testcase_60 AC 73 ms
71,696 KB
testcase_61 AC 73 ms
71,688 KB
testcase_62 AC 72 ms
71,552 KB
testcase_63 AC 73 ms
71,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

# 素数
is_prime = True
if n == 1:
    is_prime = False
for i in range(2, int(n**0.5)+1):
    if n % i == 0:
        is_prime = False
if is_prime:
    print('Sosu!')
    exit()

# 平方数
for i in range(n):
    if i*i == n:
        print('Heihosu!')
        exit()

# 立方数
for i in range(n):
    if i*i*i == n:
        print('Ripposu!')
        exit()

# 完全数
divnum = []
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        divnum.append(i)
        if i != n//i:
            divnum.append(n//i)
if sum(divnum) == 2*n:
    print('Kanzensu!')
    exit()

print(n)
0