結果

問題 No.1644 Eight Digits
ユーザー tassei903tassei903
提出日時 2021-08-13 21:33:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 1,000 ms
コード長 575 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 70,236 KB
最終ジャッジ日時 2024-04-14 16:54:33
合計ジャッジ時間 2,936 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
68,784 KB
testcase_01 AC 54 ms
66,972 KB
testcase_02 AC 54 ms
67,232 KB
testcase_03 AC 53 ms
67,308 KB
testcase_04 AC 56 ms
68,804 KB
testcase_05 AC 55 ms
68,648 KB
testcase_06 AC 57 ms
68,948 KB
testcase_07 AC 58 ms
70,064 KB
testcase_08 AC 56 ms
69,144 KB
testcase_09 AC 56 ms
69,780 KB
testcase_10 AC 57 ms
69,632 KB
testcase_11 AC 56 ms
68,416 KB
testcase_12 AC 56 ms
68,888 KB
testcase_13 AC 53 ms
67,212 KB
testcase_14 AC 57 ms
70,236 KB
testcase_15 AC 57 ms
69,176 KB
testcase_16 AC 55 ms
68,724 KB
testcase_17 AC 56 ms
69,096 KB
testcase_18 AC 57 ms
68,616 KB
testcase_19 AC 57 ms
68,544 KB
testcase_20 AC 58 ms
68,216 KB
testcase_21 AC 56 ms
69,264 KB
testcase_22 AC 55 ms
69,612 KB
testcase_23 AC 57 ms
68,884 KB
testcase_24 AC 54 ms
67,028 KB
testcase_25 AC 58 ms
69,236 KB
testcase_26 AC 54 ms
67,048 KB
testcase_27 AC 53 ms
67,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
sys.setrecursionlimit(10**7)
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

from itertools import permutations
k = ni()
ans = 0
for p in permutations(range(8)):
    x = 0
    for i,j in enumerate(p):
        x+=(j+1)*pow(10,i)
    if x%k==0:
        ans+=1
print(ans)
0