結果

問題 No.1644 Eight Digits
ユーザー kept1994kept1994
提出日時 2021-09-20 00:55:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 1,000 ms
コード長 311 bytes
コンパイル時間 1,540 ms
コンパイル使用メモリ 86,400 KB
実行使用メモリ 76,940 KB
最終ジャッジ日時 2023-09-14 23:06:44
合計ジャッジ時間 5,510 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
76,760 KB
testcase_01 AC 87 ms
76,768 KB
testcase_02 AC 87 ms
76,468 KB
testcase_03 AC 86 ms
76,784 KB
testcase_04 AC 86 ms
76,560 KB
testcase_05 AC 89 ms
76,724 KB
testcase_06 AC 87 ms
76,588 KB
testcase_07 AC 88 ms
76,672 KB
testcase_08 AC 86 ms
76,684 KB
testcase_09 AC 84 ms
76,744 KB
testcase_10 AC 86 ms
76,752 KB
testcase_11 AC 85 ms
76,812 KB
testcase_12 AC 87 ms
76,564 KB
testcase_13 AC 87 ms
76,728 KB
testcase_14 AC 86 ms
76,716 KB
testcase_15 AC 88 ms
76,812 KB
testcase_16 AC 87 ms
76,684 KB
testcase_17 AC 88 ms
76,740 KB
testcase_18 AC 87 ms
76,504 KB
testcase_19 AC 86 ms
76,476 KB
testcase_20 AC 86 ms
76,516 KB
testcase_21 AC 88 ms
76,688 KB
testcase_22 AC 86 ms
76,552 KB
testcase_23 AC 88 ms
76,784 KB
testcase_24 AC 86 ms
76,764 KB
testcase_25 AC 86 ms
76,940 KB
testcase_26 AC 86 ms
76,656 KB
testcase_27 AC 86 ms
76,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys
from itertools import permutations

def main():
    K = int(input())
    l = [str(i) for i in range(1, 9)]
    ans = 0
    for i in permutations(l):
        if int("".join(i)) % K == 0:
            ans += 1
    print(ans)
        
        
if __name__ == '__main__':
    main()
0