結果
問題 | No.2208 Linear Function |
ユーザー |
|
提出日時 | 2023-03-05 00:36:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 1,598 ms |
コンパイル使用メモリ | 167,096 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-18 01:26:41 |
合計ジャッジ時間 | 2,012 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {ios::sync_with_stdio(false);cin.tie(nullptr);int t;cin >> t;while (t--) {int l, r, a, b;cin >> l >> r >> a >> b;if (a >= 0) {cout << a * r + b << '\n';} else {cout << a * l + b << '\n';}}}