結果

問題 No.2208 Linear Function
ユーザー dm99xdm99x
提出日時 2023-07-27 13:11:37
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 29,696 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-15 01:13:52
合計ジャッジ時間 634 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void)
{
    int T = 0;
    int ans[T];
    scanf("%d", &T);
    for(int i = 0; i < T; i++)
    {
        int L[T], R[T], A[T], B[T];
        scanf("%d %d %d %d", &L[i], &R[i], &A[i], &B[i]);
        if(A[i] <= 0)
        {
            ans[i] = A[i] * L[i] + B[i];
        }
        else
        {
            ans[i] = A[i] * R[i] + B[i];
        }
    }
    for(int i = 0; i < T; i++)
    {
        printf("%d\n", ans[i]);
    }
    return 0;
}
0