結果
| 問題 |
No.2208 Linear Function
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-25 11:56:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 259 bytes |
| コンパイル時間 | 1,638 ms |
| コンパイル使用メモリ | 165,548 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 19:12:21 |
| 合計ジャッジ時間 | 2,168 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
void solve(){
int l,r,a,b;
cin>>l>>r>>a>>b;
if (a>=0) cout<<a*r+b<<endl;
else cout<<a*l+b<<endl;
}
int main(){
int t;
cin>>t;
rep(i,t) solve();
}