結果
| 問題 |
No.2208 Linear Function
|
| コンテスト | |
| ユーザー |
shisidor
|
| 提出日時 | 2023-03-15 19:38:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 268 bytes |
| コンパイル時間 | 543 ms |
| コンパイル使用メモリ | 64,836 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 08:50:08 |
| 合計ジャッジ時間 | 1,025 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 |
ソースコード
#include<iostream>
using namespace std;
int main() {
int t;
cin >> t;
for (int i = 0; i < t; i++ ) {
int l, r, a, b;
cin >> l >> r >> a >> b;
if (a < 0) {
cout << a * l + b << endl;
}
else {
cout << a * r + b << endl;
}
}
}
shisidor