結果
問題 | No.1644 Eight Digits |
ユーザー |
|
提出日時 | 2021-08-13 22:38:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 58 ms / 1,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 311 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 76,036 KB |
最終ジャッジ日時 | 2024-10-03 20:34:13 |
合計ジャッジ時間 | 2,761 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#!/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()