結果

問題 No.1644 Eight Digits
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-08-13 21:26:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 1,000 ms
コード長 225 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 76,136 KB
最終ジャッジ日時 2024-04-14 16:40:27
合計ジャッジ時間 2,767 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
76,036 KB
testcase_01 AC 57 ms
75,772 KB
testcase_02 AC 57 ms
75,964 KB
testcase_03 AC 58 ms
75,980 KB
testcase_04 AC 60 ms
75,924 KB
testcase_05 AC 58 ms
75,748 KB
testcase_06 AC 60 ms
75,948 KB
testcase_07 AC 60 ms
76,048 KB
testcase_08 AC 60 ms
76,136 KB
testcase_09 AC 61 ms
75,964 KB
testcase_10 AC 60 ms
76,044 KB
testcase_11 AC 58 ms
76,112 KB
testcase_12 AC 59 ms
75,972 KB
testcase_13 AC 58 ms
75,920 KB
testcase_14 AC 60 ms
75,548 KB
testcase_15 AC 58 ms
76,100 KB
testcase_16 AC 59 ms
75,916 KB
testcase_17 AC 59 ms
75,988 KB
testcase_18 AC 60 ms
75,896 KB
testcase_19 AC 58 ms
75,788 KB
testcase_20 AC 58 ms
76,080 KB
testcase_21 AC 58 ms
76,032 KB
testcase_22 AC 60 ms
75,540 KB
testcase_23 AC 59 ms
75,944 KB
testcase_24 AC 56 ms
75,968 KB
testcase_25 AC 59 ms
75,952 KB
testcase_26 AC 57 ms
75,748 KB
testcase_27 AC 57 ms
75,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

k = int(input())
from itertools import permutations

ans = 0
l = list(map(str, range(1, 9)))
for p in permutations(l, 8):
    s = ""
    for i in range(8):
        s += p[i]
    if int(s) % k == 0:
        ans += 1
print(ans)
0