結果

問題 No.2208 Linear Function
ユーザー keisuke6
提出日時 2023-02-10 21:20:36
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 2,020 ms
コンパイル使用メモリ 193,112 KB
最終ジャッジ日時 2025-02-10 12:00:25
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int T;
  cin>>T;
  while(T--){
      int L,R,A,B;
      cin>>L>>R>>A>>B;
      cout<<max(A*L+B,R*A+B)<<endl;
  }
}
0