結果

問題 No.1644 Eight Digits
ユーザー rlangevin
提出日時 2024-12-09 08:55:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 194 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 67,524 KB
最終ジャッジ日時 2024-12-09 08:55:47
合計ジャッジ時間 3,228 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import *

K = int(input())
ans = 0
for t in permutations(range(1, 9)):
    a = 0
    for i in range(8):
        a = a * 10 + t[i]
    if a % K == 0:
        ans += 1
  
print(ans)
0