結果

問題 No.2208 Linear Function
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2023-05-07 23:01:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-05-03 18:09:23
合計ジャッジ時間 904 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,368 KB
testcase_01 AC 34 ms
10,496 KB
testcase_02 AC 35 ms
10,368 KB
testcase_03 AC 35 ms
10,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
for _ in range(n):
    x0, x1, a, b = map(int, input().split())
    ans = a * (x1 if a >= 0 else x0) + b
    print(ans)
0