結果

問題 No.1644 Eight Digits
ユーザー sgswsgsw
提出日時 2021-08-13 21:55:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 1,000 ms
コード長 599 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 76,264 KB
最終ジャッジ日時 2024-04-14 17:43:29
合計ジャッジ時間 3,065 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
75,660 KB
testcase_01 AC 63 ms
75,960 KB
testcase_02 AC 63 ms
75,660 KB
testcase_03 AC 66 ms
75,652 KB
testcase_04 AC 65 ms
76,100 KB
testcase_05 AC 65 ms
75,828 KB
testcase_06 AC 64 ms
75,728 KB
testcase_07 AC 65 ms
75,576 KB
testcase_08 AC 65 ms
75,712 KB
testcase_09 AC 64 ms
75,576 KB
testcase_10 AC 65 ms
75,636 KB
testcase_11 AC 66 ms
75,864 KB
testcase_12 AC 67 ms
75,756 KB
testcase_13 AC 65 ms
75,732 KB
testcase_14 AC 65 ms
75,712 KB
testcase_15 AC 63 ms
75,664 KB
testcase_16 AC 64 ms
75,924 KB
testcase_17 AC 66 ms
75,672 KB
testcase_18 AC 66 ms
76,264 KB
testcase_19 AC 65 ms
75,740 KB
testcase_20 AC 65 ms
75,584 KB
testcase_21 AC 65 ms
75,684 KB
testcase_22 AC 65 ms
75,704 KB
testcase_23 AC 67 ms
75,676 KB
testcase_24 AC 66 ms
75,924 KB
testcase_25 AC 66 ms
75,892 KB
testcase_26 AC 64 ms
75,812 KB
testcase_27 AC 64 ms
75,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

'''
    Python3(PyPy3) Template for Programming-Contest.

    author : sgsw

    generated : 2021/08/13   
    when : 21:53:11

'''

import sys


def input():
    return sys.stdin.readline().rstrip()


DXY = [(0, -1), (1, 0), (0, 1), (-1, 0)]  # LDRU
mod = 998244353
inf = 1 << 64

from itertools import permutations
def main():
    d = int(input())
    ans = 0
    perm = [i + 1 for i in range(8)]
    for array in permutations(perm):
        num = "".join(list(map(str,array)))
        if int(num) % d == 0:
            ans += 1
    print(ans)
    return 0


if __name__ == "__main__":
    main()
0