結果

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

ソースコード

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