結果
問題 | No.1644 Eight Digits |
ユーザー |
![]() |
提出日時 | 2021-08-13 21:55:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 75 ms / 1,000 ms |
コード長 | 599 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 75,904 KB |
最終ジャッジ日時 | 2024-10-03 18:37:57 |
合計ジャッジ時間 | 3,132 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
'''Python3(PyPy3) Template for Programming-Contest.author : sgswgenerated : 2021/08/13when : 21:53:11'''import sysdef input():return sys.stdin.readline().rstrip()DXY = [(0, -1), (1, 0), (0, 1), (-1, 0)] # LDRUmod = 998244353inf = 1 << 64from itertools import permutationsdef main():d = int(input())ans = 0perm = [i + 1 for i in range(8)]for array in permutations(perm):num = "".join(list(map(str,array)))if int(num) % d == 0:ans += 1print(ans)return 0if __name__ == "__main__":main()