結果
| 問題 | No.1083 余りの余り |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-24 13:24:58 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 1,401 ms / 3,000 ms |
| コード長 | 282 bytes |
| 記録 | |
| コンパイル時間 | 505 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-08 12:06:15 |
| 合計ジャッジ時間 | 14,327 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
from itertools import product
n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
ans=0
for bit in product(range(2),repeat=n-1):
tmp=k
for i in range(n-1):
if bit[i]:
tmp%=a[i]
tmp%=a[-1]
ans=max(ans,tmp)
print(ans)