結果

問題 No.889 素数!
ユーザー tter4tter4
提出日時 2019-09-20 23:17:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 612 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,280 KB
実行使用メモリ 71,932 KB
最終ジャッジ日時 2023-10-12 21:48:50
合計ジャッジ時間 7,458 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,644 KB
testcase_01 AC 70 ms
71,748 KB
testcase_02 AC 73 ms
71,888 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 72 ms
71,660 KB
testcase_06 AC 70 ms
71,688 KB
testcase_07 AC 73 ms
71,784 KB
testcase_08 AC 72 ms
71,844 KB
testcase_09 AC 71 ms
71,800 KB
testcase_10 AC 72 ms
71,728 KB
testcase_11 AC 71 ms
71,552 KB
testcase_12 AC 71 ms
71,704 KB
testcase_13 AC 73 ms
71,660 KB
testcase_14 AC 74 ms
71,900 KB
testcase_15 AC 74 ms
71,928 KB
testcase_16 AC 73 ms
71,540 KB
testcase_17 AC 71 ms
71,856 KB
testcase_18 AC 71 ms
71,916 KB
testcase_19 AC 72 ms
71,684 KB
testcase_20 AC 71 ms
71,836 KB
testcase_21 AC 70 ms
71,684 KB
testcase_22 AC 71 ms
71,704 KB
testcase_23 AC 73 ms
71,656 KB
testcase_24 AC 73 ms
71,812 KB
testcase_25 AC 72 ms
71,652 KB
testcase_26 AC 73 ms
71,840 KB
testcase_27 AC 74 ms
71,448 KB
testcase_28 AC 72 ms
71,632 KB
testcase_29 AC 71 ms
71,932 KB
testcase_30 AC 74 ms
71,488 KB
testcase_31 AC 73 ms
71,432 KB
testcase_32 AC 73 ms
71,672 KB
testcase_33 AC 74 ms
71,536 KB
testcase_34 AC 72 ms
71,532 KB
testcase_35 AC 71 ms
71,448 KB
testcase_36 AC 74 ms
71,536 KB
testcase_37 AC 72 ms
71,864 KB
testcase_38 AC 73 ms
71,744 KB
testcase_39 AC 74 ms
71,448 KB
testcase_40 AC 72 ms
71,800 KB
testcase_41 AC 72 ms
71,756 KB
testcase_42 AC 72 ms
71,684 KB
testcase_43 AC 73 ms
71,780 KB
testcase_44 AC 73 ms
71,668 KB
testcase_45 AC 72 ms
71,688 KB
testcase_46 AC 73 ms
71,684 KB
testcase_47 AC 70 ms
71,688 KB
testcase_48 AC 71 ms
71,632 KB
testcase_49 AC 74 ms
71,448 KB
testcase_50 AC 71 ms
71,704 KB
testcase_51 AC 72 ms
71,684 KB
testcase_52 AC 73 ms
71,632 KB
testcase_53 AC 73 ms
71,532 KB
testcase_54 AC 73 ms
71,728 KB
testcase_55 AC 74 ms
71,744 KB
testcase_56 AC 70 ms
71,688 KB
testcase_57 AC 72 ms
71,448 KB
testcase_58 AC 73 ms
71,496 KB
testcase_59 AC 71 ms
71,708 KB
testcase_60 AC 72 ms
71,448 KB
testcase_61 AC 74 ms
71,780 KB
testcase_62 AC 74 ms
71,728 KB
testcase_63 AC 73 ms
71,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

# 素数
is_prime = True
if n == 0 and 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