結果
問題 | No.1644 Eight Digits |
ユーザー |
![]() |
提出日時 | 2021-08-13 21:23:37 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 70 ms / 1,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 363 ms |
コンパイル使用メモリ | 82,524 KB |
実行使用メモリ | 76,364 KB |
最終ジャッジ日時 | 2024-10-03 16:50:47 |
合計ジャッジ時間 | 3,119 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
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()