結果
問題 | No.1644 Eight Digits |
ユーザー |
|
提出日時 | 2024-07-08 16:59:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 168 ms / 1,000 ms |
コード長 | 232 bytes |
コンパイル時間 | 1,342 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-08 16:59:25 |
合計ジャッジ時間 | 6,906 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
from itertools import permutationsnums = [x for x in range(1, 9)]k = int(input())cnt = 0for num in permutations(nums):ans = ""for n in num:ans += str(n)if int(ans) % k == 0:cnt += 1print(cnt)