結果

問題 No.1644 Eight Digits
ユーザー ygd.ygd.
提出日時 2021-08-13 21:25:42
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 93 ms / 1,000 ms
コード長 299 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 77,144 KB
最終ジャッジ日時 2023-07-27 03:14:05
合計ジャッジ時間 4,145 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
77,032 KB
testcase_01 AC 92 ms
77,064 KB
testcase_02 AC 89 ms
76,992 KB
testcase_03 AC 89 ms
76,940 KB
testcase_04 AC 88 ms
76,800 KB
testcase_05 AC 91 ms
76,880 KB
testcase_06 AC 89 ms
77,144 KB
testcase_07 AC 89 ms
77,040 KB
testcase_08 AC 89 ms
76,796 KB
testcase_09 AC 88 ms
77,020 KB
testcase_10 AC 89 ms
77,024 KB
testcase_11 AC 89 ms
77,132 KB
testcase_12 AC 88 ms
76,848 KB
testcase_13 AC 89 ms
77,004 KB
testcase_14 AC 90 ms
77,068 KB
testcase_15 AC 93 ms
77,044 KB
testcase_16 AC 93 ms
76,884 KB
testcase_17 AC 93 ms
77,088 KB
testcase_18 AC 90 ms
76,856 KB
testcase_19 AC 87 ms
76,952 KB
testcase_20 AC 89 ms
76,968 KB
testcase_21 AC 89 ms
76,900 KB
testcase_22 AC 89 ms
76,952 KB
testcase_23 AC 90 ms
77,108 KB
testcase_24 AC 90 ms
77,008 KB
testcase_25 AC 91 ms
76,800 KB
testcase_26 AC 89 ms
76,824 KB
testcase_27 AC 89 ms
76,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

def main():
    N = "12345678"
    N = [a for a in N]
    #print(N)
    K = int(input())

    L = itertools.permutations(N,8)
    ans = 0
    for x in L:
        v = int("".join(x))
        if v % K == 0:
            ans += 1
    print(ans)



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