結果

問題 No.889 素数!
ユーザー tter4tter4
提出日時 2019-09-20 23:18:58
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 622 bytes
コンパイル時間 1,571 ms
コンパイル使用メモリ 86,812 KB
実行使用メモリ 71,680 KB
最終ジャッジ日時 2023-10-12 21:51:39
合計ジャッジ時間 8,869 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,584 KB
testcase_01 AC 76 ms
71,448 KB
testcase_02 AC 77 ms
71,420 KB
testcase_03 AC 78 ms
71,048 KB
testcase_04 AC 78 ms
70,848 KB
testcase_05 AC 78 ms
71,292 KB
testcase_06 AC 77 ms
71,356 KB
testcase_07 AC 77 ms
71,320 KB
testcase_08 AC 77 ms
71,212 KB
testcase_09 AC 77 ms
71,200 KB
testcase_10 AC 77 ms
71,408 KB
testcase_11 AC 76 ms
71,464 KB
testcase_12 AC 76 ms
71,632 KB
testcase_13 AC 77 ms
71,212 KB
testcase_14 AC 75 ms
71,624 KB
testcase_15 AC 76 ms
71,616 KB
testcase_16 AC 75 ms
71,036 KB
testcase_17 AC 75 ms
71,456 KB
testcase_18 AC 77 ms
71,460 KB
testcase_19 AC 76 ms
71,032 KB
testcase_20 AC 76 ms
71,504 KB
testcase_21 AC 75 ms
71,356 KB
testcase_22 AC 76 ms
71,028 KB
testcase_23 AC 77 ms
71,448 KB
testcase_24 AC 76 ms
71,240 KB
testcase_25 AC 76 ms
71,036 KB
testcase_26 AC 76 ms
71,632 KB
testcase_27 AC 76 ms
71,664 KB
testcase_28 AC 75 ms
71,372 KB
testcase_29 AC 75 ms
71,320 KB
testcase_30 AC 75 ms
71,356 KB
testcase_31 AC 75 ms
71,296 KB
testcase_32 AC 76 ms
71,624 KB
testcase_33 AC 75 ms
71,144 KB
testcase_34 AC 76 ms
71,628 KB
testcase_35 AC 75 ms
71,444 KB
testcase_36 AC 77 ms
71,296 KB
testcase_37 AC 79 ms
71,644 KB
testcase_38 AC 76 ms
71,148 KB
testcase_39 AC 76 ms
71,044 KB
testcase_40 AC 75 ms
71,364 KB
testcase_41 AC 75 ms
71,576 KB
testcase_42 AC 75 ms
71,416 KB
testcase_43 AC 75 ms
71,320 KB
testcase_44 AC 75 ms
71,556 KB
testcase_45 AC 74 ms
71,556 KB
testcase_46 AC 73 ms
71,212 KB
testcase_47 AC 74 ms
71,588 KB
testcase_48 AC 76 ms
71,448 KB
testcase_49 AC 74 ms
71,300 KB
testcase_50 AC 74 ms
71,628 KB
testcase_51 AC 78 ms
71,660 KB
testcase_52 AC 76 ms
71,316 KB
testcase_53 AC 76 ms
71,316 KB
testcase_54 AC 74 ms
71,200 KB
testcase_55 AC 74 ms
71,624 KB
testcase_56 AC 74 ms
71,028 KB
testcase_57 AC 74 ms
71,436 KB
testcase_58 AC 76 ms
71,416 KB
testcase_59 AC 75 ms
71,624 KB
testcase_60 AC 75 ms
71,552 KB
testcase_61 AC 76 ms
71,680 KB
testcase_62 AC 77 ms
71,464 KB
testcase_63 AC 76 ms
71,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

# 素数
is_prime = True
if n == 0 or 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 n != 0 and sum(divnum) == 2*n:
    print('Kanzensu!')
    exit()

print(n)
0