結果

問題 No.1644 Eight Digits
ユーザー tassei903tassei903
提出日時 2021-08-13 21:33:49
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 95 ms / 1,000 ms
コード長 575 bytes
コンパイル時間 692 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 76,612 KB
最終ジャッジ日時 2023-07-27 03:31:45
合計ジャッジ時間 4,583 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
76,364 KB
testcase_01 AC 89 ms
76,208 KB
testcase_02 AC 88 ms
76,612 KB
testcase_03 AC 87 ms
76,476 KB
testcase_04 AC 90 ms
76,312 KB
testcase_05 AC 91 ms
76,400 KB
testcase_06 AC 92 ms
76,404 KB
testcase_07 AC 93 ms
76,548 KB
testcase_08 AC 91 ms
76,500 KB
testcase_09 AC 91 ms
76,500 KB
testcase_10 AC 92 ms
76,348 KB
testcase_11 AC 91 ms
76,360 KB
testcase_12 AC 92 ms
76,416 KB
testcase_13 AC 90 ms
76,376 KB
testcase_14 AC 93 ms
76,232 KB
testcase_15 AC 93 ms
76,552 KB
testcase_16 AC 92 ms
76,332 KB
testcase_17 AC 92 ms
76,428 KB
testcase_18 AC 93 ms
76,308 KB
testcase_19 AC 92 ms
76,424 KB
testcase_20 AC 95 ms
76,568 KB
testcase_21 AC 94 ms
76,492 KB
testcase_22 AC 94 ms
76,424 KB
testcase_23 AC 93 ms
76,436 KB
testcase_24 AC 90 ms
76,484 KB
testcase_25 AC 94 ms
76,424 KB
testcase_26 AC 89 ms
76,136 KB
testcase_27 AC 90 ms
76,244 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