結果

問題 No.889 素数!
ユーザー tter4tter4
提出日時 2019-09-20 23:15:22
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 601 bytes
コンパイル時間 1,534 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 71,964 KB
最終ジャッジ日時 2023-10-12 21:46:27
合計ジャッジ時間 8,217 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,512 KB
testcase_01 AC 76 ms
71,432 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 74 ms
71,032 KB
testcase_05 AC 76 ms
71,232 KB
testcase_06 AC 74 ms
71,604 KB
testcase_07 WA -
testcase_08 AC 74 ms
71,640 KB
testcase_09 AC 75 ms
71,744 KB
testcase_10 AC 76 ms
71,652 KB
testcase_11 AC 74 ms
71,564 KB
testcase_12 WA -
testcase_13 AC 74 ms
71,640 KB
testcase_14 AC 74 ms
71,408 KB
testcase_15 AC 76 ms
71,512 KB
testcase_16 AC 76 ms
71,656 KB
testcase_17 AC 76 ms
71,604 KB
testcase_18 WA -
testcase_19 AC 75 ms
71,396 KB
testcase_20 AC 74 ms
71,796 KB
testcase_21 AC 76 ms
71,572 KB
testcase_22 AC 76 ms
71,788 KB
testcase_23 AC 76 ms
71,612 KB
testcase_24 AC 77 ms
71,744 KB
testcase_25 AC 77 ms
71,796 KB
testcase_26 WA -
testcase_27 AC 82 ms
71,236 KB
testcase_28 AC 77 ms
71,584 KB
testcase_29 AC 76 ms
71,396 KB
testcase_30 AC 76 ms
71,656 KB
testcase_31 AC 76 ms
71,704 KB
testcase_32 AC 77 ms
71,632 KB
testcase_33 AC 76 ms
71,236 KB
testcase_34 AC 77 ms
71,568 KB
testcase_35 AC 78 ms
71,644 KB
testcase_36 AC 77 ms
71,624 KB
testcase_37 AC 75 ms
71,336 KB
testcase_38 AC 77 ms
71,656 KB
testcase_39 AC 76 ms
71,396 KB
testcase_40 AC 77 ms
71,428 KB
testcase_41 AC 77 ms
71,568 KB
testcase_42 AC 76 ms
71,608 KB
testcase_43 AC 78 ms
71,396 KB
testcase_44 AC 77 ms
71,228 KB
testcase_45 AC 76 ms
71,412 KB
testcase_46 AC 77 ms
71,564 KB
testcase_47 AC 75 ms
71,596 KB
testcase_48 AC 77 ms
71,404 KB
testcase_49 WA -
testcase_50 AC 79 ms
71,620 KB
testcase_51 AC 77 ms
71,592 KB
testcase_52 AC 75 ms
71,528 KB
testcase_53 AC 77 ms
71,640 KB
testcase_54 AC 76 ms
71,428 KB
testcase_55 AC 77 ms
71,508 KB
testcase_56 AC 75 ms
71,788 KB
testcase_57 AC 77 ms
71,236 KB
testcase_58 AC 75 ms
71,408 KB
testcase_59 AC 76 ms
71,400 KB
testcase_60 AC 76 ms
71,656 KB
testcase_61 AC 76 ms
71,552 KB
testcase_62 AC 75 ms
71,756 KB
testcase_63 AC 76 ms
71,604 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