結果

問題 No.1644 Eight Digits
ユーザー ygd.ygd.
提出日時 2021-08-13 21:25:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 299 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 82,640 KB
実行使用メモリ 76,064 KB
最終ジャッジ日時 2024-04-14 16:38:12
合計ジャッジ時間 2,801 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
75,552 KB
testcase_01 AC 59 ms
75,796 KB
testcase_02 AC 57 ms
75,484 KB
testcase_03 AC 55 ms
75,612 KB
testcase_04 AC 54 ms
75,808 KB
testcase_05 AC 55 ms
75,496 KB
testcase_06 AC 55 ms
75,512 KB
testcase_07 AC 59 ms
75,924 KB
testcase_08 AC 54 ms
75,724 KB
testcase_09 AC 55 ms
75,724 KB
testcase_10 AC 55 ms
75,808 KB
testcase_11 AC 55 ms
75,476 KB
testcase_12 AC 55 ms
76,056 KB
testcase_13 AC 54 ms
76,064 KB
testcase_14 AC 54 ms
75,384 KB
testcase_15 AC 55 ms
76,060 KB
testcase_16 AC 54 ms
75,680 KB
testcase_17 AC 56 ms
75,748 KB
testcase_18 AC 53 ms
75,932 KB
testcase_19 AC 56 ms
75,556 KB
testcase_20 AC 55 ms
75,248 KB
testcase_21 AC 56 ms
75,792 KB
testcase_22 AC 55 ms
75,424 KB
testcase_23 AC 57 ms
75,500 KB
testcase_24 AC 55 ms
75,716 KB
testcase_25 AC 57 ms
75,416 KB
testcase_26 AC 56 ms
75,688 KB
testcase_27 AC 55 ms
75,940 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