結果
| 問題 |
No.2208 Linear Function
|
| コンテスト | |
| ユーザー |
ただのガゼス(MonAgent)
|
| 提出日時 | 2024-02-15 01:36:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 315 bytes |
| コンパイル時間 | 443 ms |
| コンパイル使用メモリ | 63,216 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-28 19:03:08 |
| 合計ジャッジ時間 | 923 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 |
ソースコード
#include <iostream>
using namespace std;
int main(void){
int T, L, R, A, B;
int ans = 0;
cin >> T;
for (int i = 0; i < T; ++i){
ans = 0;
cin >> L >> R >> A >> B;
if (A > 0){
ans = A * R + B;
}else if (A < 0){
ans = A * L + B;
}else{
ans = B;
}
cout << ans << endl;
}
return 0;
}
ただのガゼス(MonAgent)