結果

問題 No.1644 Eight Digits
ユーザー hir355hir355
提出日時 2021-08-13 21:24:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 53 ms / 1,000 ms
コード長 223 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 82,624 KB
実行使用メモリ 67,860 KB
最終ジャッジ日時 2024-04-14 16:35:12
合計ジャッジ時間 2,514 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
67,444 KB
testcase_01 AC 47 ms
65,844 KB
testcase_02 AC 48 ms
65,204 KB
testcase_03 AC 47 ms
66,288 KB
testcase_04 AC 49 ms
67,256 KB
testcase_05 AC 49 ms
66,384 KB
testcase_06 AC 50 ms
67,568 KB
testcase_07 AC 53 ms
67,768 KB
testcase_08 AC 49 ms
66,120 KB
testcase_09 AC 49 ms
66,852 KB
testcase_10 AC 49 ms
66,948 KB
testcase_11 AC 49 ms
66,760 KB
testcase_12 AC 49 ms
66,268 KB
testcase_13 AC 48 ms
66,032 KB
testcase_14 AC 50 ms
66,388 KB
testcase_15 AC 51 ms
67,328 KB
testcase_16 AC 50 ms
66,636 KB
testcase_17 AC 51 ms
66,180 KB
testcase_18 AC 53 ms
67,636 KB
testcase_19 AC 50 ms
66,888 KB
testcase_20 AC 51 ms
65,900 KB
testcase_21 AC 50 ms
66,332 KB
testcase_22 AC 50 ms
67,100 KB
testcase_23 AC 50 ms
67,072 KB
testcase_24 AC 48 ms
65,476 KB
testcase_25 AC 53 ms
67,860 KB
testcase_26 AC 47 ms
65,008 KB
testcase_27 AC 48 ms
64,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
k = int(input())
ans = 0
for p in permutations(range(1, 9)):
    t = 0
    x = 1
    for i in range(8):
        t += p[i] * x
        x *= 10
    if t % k == 0:
        ans += 1
print(ans)
0