結果

問題 No.1644 Eight Digits
ユーザー kimiyukikimiyuki
提出日時 2021-08-13 22:38:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 57 ms / 1,000 ms
コード長 423 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 82,796 KB
実行使用メモリ 76,032 KB
最終ジャッジ日時 2024-04-14 19:03:08
合計ジャッジ時間 2,801 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
76,032 KB
testcase_01 AC 56 ms
75,764 KB
testcase_02 AC 56 ms
75,536 KB
testcase_03 AC 56 ms
76,000 KB
testcase_04 AC 55 ms
75,640 KB
testcase_05 AC 55 ms
75,572 KB
testcase_06 AC 56 ms
75,708 KB
testcase_07 AC 57 ms
75,660 KB
testcase_08 AC 56 ms
75,740 KB
testcase_09 AC 57 ms
75,484 KB
testcase_10 AC 56 ms
75,740 KB
testcase_11 AC 56 ms
75,764 KB
testcase_12 AC 56 ms
75,624 KB
testcase_13 AC 56 ms
75,620 KB
testcase_14 AC 57 ms
75,484 KB
testcase_15 AC 55 ms
75,452 KB
testcase_16 AC 56 ms
75,624 KB
testcase_17 AC 55 ms
75,484 KB
testcase_18 AC 57 ms
75,828 KB
testcase_19 AC 56 ms
75,488 KB
testcase_20 AC 56 ms
75,900 KB
testcase_21 AC 55 ms
75,660 KB
testcase_22 AC 56 ms
75,900 KB
testcase_23 AC 57 ms
75,480 KB
testcase_24 AC 56 ms
75,684 KB
testcase_25 AC 56 ms
75,656 KB
testcase_26 AC 56 ms
75,560 KB
testcase_27 AC 56 ms
75,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# from typing import *
import itertools

def solve(k: int) -> int:
    cnt = 0
    for p in itertools.permutations('12345678'):
        if int(''.join(p)) % k == 0:
            cnt += 1
    return cnt




# generated by oj-template v4.8.0 (https://github.com/online-judge-tools/template-generator)
def main():
    K = int(input())
    a = solve(K)
    print(a)


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