結果

問題 No.889 素数!
ユーザー tter4tter4
提出日時 2019-09-20 23:17:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 611 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 71,788 KB
最終ジャッジ日時 2023-10-12 21:49:23
合計ジャッジ時間 7,493 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,424 KB
testcase_01 AC 76 ms
71,332 KB
testcase_02 AC 77 ms
71,696 KB
testcase_03 WA -
testcase_04 AC 75 ms
71,344 KB
testcase_05 AC 76 ms
71,640 KB
testcase_06 AC 76 ms
71,504 KB
testcase_07 AC 76 ms
71,556 KB
testcase_08 AC 77 ms
71,396 KB
testcase_09 AC 77 ms
71,636 KB
testcase_10 AC 77 ms
71,568 KB
testcase_11 AC 76 ms
71,768 KB
testcase_12 AC 76 ms
71,332 KB
testcase_13 AC 77 ms
71,568 KB
testcase_14 AC 76 ms
71,612 KB
testcase_15 AC 76 ms
71,508 KB
testcase_16 AC 75 ms
71,700 KB
testcase_17 AC 76 ms
71,604 KB
testcase_18 AC 75 ms
71,624 KB
testcase_19 AC 74 ms
71,740 KB
testcase_20 AC 76 ms
71,612 KB
testcase_21 AC 75 ms
71,768 KB
testcase_22 AC 76 ms
71,440 KB
testcase_23 AC 76 ms
71,704 KB
testcase_24 AC 76 ms
71,424 KB
testcase_25 AC 76 ms
71,432 KB
testcase_26 AC 78 ms
71,788 KB
testcase_27 AC 78 ms
71,372 KB
testcase_28 AC 78 ms
71,164 KB
testcase_29 AC 77 ms
71,432 KB
testcase_30 AC 76 ms
71,784 KB
testcase_31 AC 77 ms
71,424 KB
testcase_32 AC 78 ms
71,656 KB
testcase_33 AC 78 ms
71,644 KB
testcase_34 AC 78 ms
71,424 KB
testcase_35 AC 76 ms
71,232 KB
testcase_36 AC 78 ms
71,772 KB
testcase_37 AC 77 ms
71,336 KB
testcase_38 AC 78 ms
71,340 KB
testcase_39 AC 76 ms
71,572 KB
testcase_40 AC 77 ms
71,512 KB
testcase_41 AC 78 ms
71,212 KB
testcase_42 AC 76 ms
71,392 KB
testcase_43 AC 79 ms
71,544 KB
testcase_44 AC 76 ms
71,612 KB
testcase_45 AC 78 ms
71,328 KB
testcase_46 AC 76 ms
71,768 KB
testcase_47 AC 77 ms
71,608 KB
testcase_48 AC 76 ms
71,664 KB
testcase_49 AC 77 ms
71,788 KB
testcase_50 AC 76 ms
71,472 KB
testcase_51 AC 77 ms
71,768 KB
testcase_52 AC 78 ms
71,704 KB
testcase_53 AC 77 ms
71,716 KB
testcase_54 AC 77 ms
71,708 KB
testcase_55 AC 79 ms
71,560 KB
testcase_56 AC 77 ms
71,428 KB
testcase_57 AC 77 ms
71,508 KB
testcase_58 AC 76 ms
71,572 KB
testcase_59 AC 77 ms
71,424 KB
testcase_60 AC 76 ms
71,648 KB
testcase_61 AC 76 ms
71,644 KB
testcase_62 AC 76 ms
71,612 KB
testcase_63 AC 76 ms
71,408 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 sum(divnum) == 2*n:
    print('Kanzensu!')
    exit()

print(n)
0