結果

問題 No.1644 Eight Digits
ユーザー lloyzlloyz
提出日時 2021-12-18 12:53:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 40 ms / 1,000 ms
コード長 217 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 8,220 KB
最終ジャッジ日時 2023-10-13 17:07:02
合計ジャッジ時間 3,386 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
8,164 KB
testcase_01 AC 37 ms
8,100 KB
testcase_02 AC 37 ms
8,176 KB
testcase_03 AC 36 ms
8,180 KB
testcase_04 AC 34 ms
7,992 KB
testcase_05 AC 34 ms
8,060 KB
testcase_06 AC 36 ms
8,176 KB
testcase_07 AC 34 ms
8,172 KB
testcase_08 AC 38 ms
8,056 KB
testcase_09 AC 35 ms
8,188 KB
testcase_10 AC 35 ms
8,176 KB
testcase_11 AC 35 ms
7,996 KB
testcase_12 AC 34 ms
8,084 KB
testcase_13 AC 37 ms
8,176 KB
testcase_14 AC 36 ms
8,180 KB
testcase_15 AC 35 ms
8,092 KB
testcase_16 AC 36 ms
8,148 KB
testcase_17 AC 38 ms
8,108 KB
testcase_18 AC 35 ms
8,168 KB
testcase_19 AC 36 ms
8,036 KB
testcase_20 AC 39 ms
8,172 KB
testcase_21 AC 36 ms
8,108 KB
testcase_22 AC 36 ms
8,152 KB
testcase_23 AC 39 ms
7,992 KB
testcase_24 AC 40 ms
8,220 KB
testcase_25 AC 38 ms
8,176 KB
testcase_26 AC 39 ms
8,180 KB
testcase_27 AC 38 ms
8,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

N = ['1', '2', '3', '4', '5', '6', '7', '8']
k = int(input())
ans = 0
for P in permutations(N):
    num = int(''.join(P))
    if num % k == 0:
        ans += 1
print(ans)
0