結果

問題 No.1644 Eight Digits
ユーザー titan23titan23
提出日時 2022-07-03 04:35:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 80 ms / 1,000 ms
コード長 263 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 77,408 KB
最終ジャッジ日時 2023-08-19 00:26:07
合計ジャッジ時間 4,716 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
77,128 KB
testcase_01 AC 73 ms
77,072 KB
testcase_02 AC 72 ms
77,160 KB
testcase_03 AC 72 ms
77,132 KB
testcase_04 AC 77 ms
77,128 KB
testcase_05 AC 78 ms
77,096 KB
testcase_06 AC 78 ms
77,024 KB
testcase_07 AC 73 ms
77,408 KB
testcase_08 AC 73 ms
77,328 KB
testcase_09 AC 75 ms
77,216 KB
testcase_10 AC 76 ms
77,180 KB
testcase_11 AC 78 ms
77,164 KB
testcase_12 AC 77 ms
77,224 KB
testcase_13 AC 76 ms
77,020 KB
testcase_14 AC 76 ms
77,248 KB
testcase_15 AC 79 ms
77,184 KB
testcase_16 AC 80 ms
77,116 KB
testcase_17 AC 77 ms
77,340 KB
testcase_18 AC 76 ms
77,140 KB
testcase_19 AC 73 ms
76,980 KB
testcase_20 AC 76 ms
77,380 KB
testcase_21 AC 76 ms
77,372 KB
testcase_22 AC 77 ms
77,020 KB
testcase_23 AC 72 ms
77,044 KB
testcase_24 AC 72 ms
77,072 KB
testcase_25 AC 73 ms
77,172 KB
testcase_26 AC 73 ms
77,088 KB
testcase_27 AC 72 ms
77,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import permutations
input = lambda: sys.stdin.readline().rstrip()

#  -----------------------  #

k = int(input())
ans = 0
t = '12345678'
for p in permutations(t):
  m = int(''.join(map(str, p)))
  if m % k == 0:
    ans += 1
print(ans)
0