結果

問題 No.1644 Eight Digits
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-08-13 21:28:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 1,000 ms
コード長 208 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 66,868 KB
最終ジャッジ日時 2024-04-14 16:44:05
合計ジャッジ時間 2,685 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
66,032 KB
testcase_01 AC 49 ms
64,284 KB
testcase_02 AC 49 ms
64,664 KB
testcase_03 AC 48 ms
65,320 KB
testcase_04 AC 50 ms
65,220 KB
testcase_05 AC 49 ms
66,292 KB
testcase_06 AC 54 ms
65,772 KB
testcase_07 AC 50 ms
64,196 KB
testcase_08 AC 49 ms
65,808 KB
testcase_09 AC 51 ms
65,480 KB
testcase_10 AC 49 ms
66,556 KB
testcase_11 AC 48 ms
65,624 KB
testcase_12 AC 49 ms
65,616 KB
testcase_13 AC 50 ms
65,020 KB
testcase_14 AC 50 ms
66,008 KB
testcase_15 AC 49 ms
66,868 KB
testcase_16 AC 51 ms
65,224 KB
testcase_17 AC 51 ms
65,684 KB
testcase_18 AC 51 ms
66,440 KB
testcase_19 AC 50 ms
65,372 KB
testcase_20 AC 49 ms
66,036 KB
testcase_21 AC 50 ms
66,108 KB
testcase_22 AC 51 ms
66,264 KB
testcase_23 AC 51 ms
65,136 KB
testcase_24 AC 50 ms
64,124 KB
testcase_25 AC 50 ms
65,456 KB
testcase_26 AC 49 ms
64,040 KB
testcase_27 AC 48 ms
64,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

K = int(input())
ans = 0

for p in itertools.permutations([1,2,3,4,5,6,7,8],8):

    a = 0
    for i in p:
        a *= 10
        a += i

    if a % K == 0:
        ans += 1

print (ans)

0