結果

問題 No.1644 Eight Digits
ユーザー hir355hir355
提出日時 2021-08-13 21:24:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 1,000 ms
コード長 223 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 66,944 KB
最終ジャッジ日時 2024-10-03 16:53:01
合計ジャッジ時間 2,445 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

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