結果

問題 No.1644 Eight Digits
ユーザー 👑 tamatotamato
提出日時 2021-08-13 21:23:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 1,000 ms
コード長 345 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 82,608 KB
実行使用メモリ 76,236 KB
最終ジャッジ日時 2024-04-14 16:34:13
合計ジャッジ時間 2,993 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
76,140 KB
testcase_01 AC 63 ms
75,904 KB
testcase_02 AC 63 ms
75,764 KB
testcase_03 AC 63 ms
76,236 KB
testcase_04 AC 63 ms
76,036 KB
testcase_05 AC 64 ms
76,020 KB
testcase_06 AC 63 ms
75,904 KB
testcase_07 AC 68 ms
75,844 KB
testcase_08 AC 64 ms
76,092 KB
testcase_09 AC 64 ms
75,924 KB
testcase_10 AC 61 ms
75,908 KB
testcase_11 AC 62 ms
75,856 KB
testcase_12 AC 64 ms
75,844 KB
testcase_13 AC 63 ms
75,948 KB
testcase_14 AC 65 ms
75,844 KB
testcase_15 AC 64 ms
75,920 KB
testcase_16 AC 64 ms
75,724 KB
testcase_17 AC 65 ms
75,860 KB
testcase_18 AC 64 ms
75,928 KB
testcase_19 AC 64 ms
75,940 KB
testcase_20 AC 63 ms
75,796 KB
testcase_21 AC 64 ms
75,636 KB
testcase_22 AC 64 ms
75,840 KB
testcase_23 AC 64 ms
76,072 KB
testcase_24 AC 62 ms
75,728 KB
testcase_25 AC 65 ms
75,920 KB
testcase_26 AC 64 ms
75,804 KB
testcase_27 AC 64 ms
75,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from itertools import permutations
    input = sys.stdin.readline

    K = int(input())
    ans = 0
    for p in permutations(list(range(1, 9))):
        N = int("".join(map(str, p)))
        if N%K == 0:
            ans += 1
    print(ans)



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