結果
| 問題 | No.3433 [Cherry 8th Tune A] ADD OIL! |
| コンテスト | |
| ユーザー |
まぬお
|
| 提出日時 | 2026-01-23 21:22:22 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 669 bytes |
| 記録 | |
| コンパイル時間 | 188 ms |
| コンパイル使用メモリ | 82,884 KB |
| 実行使用メモリ | 66,820 KB |
| 最終ジャッジ日時 | 2026-01-23 21:22:26 |
| 合計ジャッジ時間 | 1,594 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations
from heapq import heappop, heappush
import math, sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
_int = lambda x: int(x)-1
MOD = 998244353 #10**9+7
INF = 1<<60
Yes, No = "Yes", "No"
for _ in range(int(input())):
N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = INF
for si in range(N):
cnt = 1
for i in range(N):
if si == i:
cnt *= (A[i]-K)
else:
cnt *= A[i]
ans = min(ans, cnt)
print(ans)
まぬお