結果

問題 No.1644 Eight Digits
ユーザー 👑 KazunKazun
提出日時 2021-08-13 21:23:54
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 224 bytes
コンパイル時間 433 ms
コンパイル使用メモリ 87,380 KB
実行使用メモリ 76,916 KB
最終ジャッジ日時 2023-07-27 03:10:25
合計ジャッジ時間 4,163 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
76,572 KB
testcase_01 AC 87 ms
76,676 KB
testcase_02 AC 87 ms
76,720 KB
testcase_03 AC 87 ms
76,568 KB
testcase_04 AC 87 ms
76,760 KB
testcase_05 AC 87 ms
76,760 KB
testcase_06 AC 88 ms
76,760 KB
testcase_07 AC 88 ms
76,896 KB
testcase_08 AC 89 ms
76,720 KB
testcase_09 AC 92 ms
76,796 KB
testcase_10 AC 91 ms
76,632 KB
testcase_11 AC 88 ms
76,760 KB
testcase_12 AC 90 ms
76,752 KB
testcase_13 AC 86 ms
76,712 KB
testcase_14 AC 88 ms
76,764 KB
testcase_15 AC 91 ms
76,848 KB
testcase_16 AC 86 ms
76,588 KB
testcase_17 AC 89 ms
76,792 KB
testcase_18 AC 87 ms
76,712 KB
testcase_19 AC 88 ms
76,916 KB
testcase_20 AC 88 ms
76,752 KB
testcase_21 AC 89 ms
76,752 KB
testcase_22 AC 87 ms
76,824 KB
testcase_23 AC 91 ms
76,572 KB
testcase_24 AC 88 ms
76,640 KB
testcase_25 AC 92 ms
76,776 KB
testcase_26 AC 87 ms
76,652 KB
testcase_27 AC 88 ms
76,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

def f(p):
    X=0
    b=1
    for x in p:
        X+=b*x
        b*=10
    return X

K=int(input())
X=0

for p in permutations([1,2,3,4,5,6,7,8]):
    if f(p)%K==0:
        X+=1

print(X)
0