結果

問題 No.1644 Eight Digits
ユーザー 👑 KazunKazun
提出日時 2021-08-13 21:23:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 224 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,264 KB
実行使用メモリ 75,796 KB
最終ジャッジ日時 2024-04-14 16:34:57
合計ジャッジ時間 2,729 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
75,448 KB
testcase_01 AC 55 ms
75,264 KB
testcase_02 AC 55 ms
75,216 KB
testcase_03 AC 56 ms
75,192 KB
testcase_04 AC 57 ms
75,364 KB
testcase_05 AC 56 ms
75,328 KB
testcase_06 AC 58 ms
75,456 KB
testcase_07 AC 58 ms
75,784 KB
testcase_08 AC 58 ms
75,796 KB
testcase_09 AC 57 ms
75,592 KB
testcase_10 AC 56 ms
75,288 KB
testcase_11 AC 57 ms
75,580 KB
testcase_12 AC 55 ms
75,444 KB
testcase_13 AC 54 ms
75,292 KB
testcase_14 AC 56 ms
75,484 KB
testcase_15 AC 56 ms
75,576 KB
testcase_16 AC 53 ms
75,304 KB
testcase_17 AC 57 ms
75,496 KB
testcase_18 AC 56 ms
75,588 KB
testcase_19 AC 57 ms
75,520 KB
testcase_20 AC 57 ms
75,320 KB
testcase_21 AC 57 ms
75,380 KB
testcase_22 AC 56 ms
75,660 KB
testcase_23 AC 59 ms
75,372 KB
testcase_24 AC 54 ms
75,412 KB
testcase_25 AC 59 ms
75,316 KB
testcase_26 AC 52 ms
75,284 KB
testcase_27 AC 54 ms
75,204 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