結果
問題 | No.1083 余りの余り |
ユーザー |
![]() |
提出日時 | 2020-06-23 21:41:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 2,144 ms / 3,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 247 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-03 19:31:08 |
合計ジャッジ時間 | 16,981 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 |
ソースコード
from itertools import productN, K = map(int, input().split())A = list(map(int, input().split()))A.sort(reverse=True)result = 0for p in product([True, False], repeat=N - 1):t = Kfor i in range(N - 1):if p[i]:t %= A[i]t %= A[N - 1]result = max(result, t)print(result)