結果
| 問題 | No.1083 余りの余り |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-11 14:38:25 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 151 ms / 3,000 ms |
| コード長 | 218 bytes |
| 記録 | |
| コンパイル時間 | 457 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 80,640 KB |
| 最終ジャッジ日時 | 2026-05-11 14:38:29 |
| 合計ジャッジ時間 | 3,107 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)