結果
| 問題 |
No.1083 余りの余り
|
| コンテスト | |
| ユーザー |
ttr
|
| 提出日時 | 2020-06-19 21:48:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 355 bytes |
| コンパイル時間 | 191 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-03 14:17:53 |
| 合計ジャッジ時間 | 20,736 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 14 |
ソースコード
import itertools
N,K = map(int, input().split())
A = [int(a) for a in input().split()]
s = min(A)
ans = 0
for i in range(1, N+1):
num = K
for C in itertools.combinations(A, i):
C = list(C)
C.sort(reverse=True)
for c in C:
num %= c
if s not in C:
num %= s
ans = max(ans, num)
print(ans)
ttr