結果

問題 No.1644 Eight Digits
ユーザー minimumminimum
提出日時 2021-08-13 21:25:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 1,000 ms
コード長 250 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 76,288 KB
最終ジャッジ日時 2024-04-14 16:37:59
合計ジャッジ時間 2,990 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
76,028 KB
testcase_01 AC 56 ms
73,960 KB
testcase_02 AC 57 ms
74,488 KB
testcase_03 AC 62 ms
75,936 KB
testcase_04 AC 63 ms
76,212 KB
testcase_05 AC 61 ms
76,036 KB
testcase_06 AC 64 ms
76,036 KB
testcase_07 AC 63 ms
75,836 KB
testcase_08 AC 62 ms
75,932 KB
testcase_09 AC 62 ms
76,172 KB
testcase_10 AC 62 ms
76,056 KB
testcase_11 AC 62 ms
75,924 KB
testcase_12 AC 61 ms
76,288 KB
testcase_13 AC 63 ms
75,952 KB
testcase_14 AC 63 ms
76,112 KB
testcase_15 AC 61 ms
76,240 KB
testcase_16 AC 62 ms
76,044 KB
testcase_17 AC 63 ms
76,128 KB
testcase_18 AC 64 ms
76,072 KB
testcase_19 AC 61 ms
76,140 KB
testcase_20 AC 61 ms
76,012 KB
testcase_21 AC 61 ms
76,044 KB
testcase_22 AC 64 ms
75,888 KB
testcase_23 AC 65 ms
75,948 KB
testcase_24 AC 57 ms
74,524 KB
testcase_25 AC 62 ms
75,944 KB
testcase_26 AC 58 ms
74,132 KB
testcase_27 AC 58 ms
74,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

k = int(input())
ans = 0
l = [i for i in range(1, 9)]

for v in permutations(l, 8):
    v = list(v)
    x = 0
    for i in range(8):
        x *= 10
        x += v[i]
    if x % k == 0:
        ans += 1

print(ans)
0