結果
問題 | No.2208 Linear Function |
ユーザー |
|
提出日時 | 2023-02-10 21:27:00 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 727 ms |
コンパイル使用メモリ | 98,364 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-22 17:27:19 |
合計ジャッジ時間 | 1,199 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 |
ソースコード
import std.stdio;import std.conv;import std.string;void main(){auto T = readln.chomp.to!int;for(auto t = 0; t < T; t++){auto s = readln.chomp.split.to!(int[]);if(s[2] > 0){writeln(s[1] * s[2] + s[3]);}else{writeln(s[0] * s[2] + s[3]);}}}