結果
| 問題 | No.1083 余りの余り |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-11 14:38:25 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 138 ms / 3,000 ms |
| + 342µs | |
| コード長 | 218 bytes |
| 記録 | |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 80,384 KB |
| 実行使用メモリ | 83,200 KB |
| 最終ジャッジ日時 | 2026-09-24 09:52:34 |
| 合計ジャッジ時間 | 4,270 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
n,k=map(int,input().split()) a=list(map(int,input().split())) a.sort(reverse=True);ans=0 for i in range(1,1<<n): if i>>(n-1)&1==0: continue c=k for j in range(n): if i>>j&1: c%=a[j] ans=max(ans,c) print(ans)