結果
| 問題 |
No.2208 Linear Function
|
| コンテスト | |
| ユーザー |
Rusty
|
| 提出日時 | 2023-02-12 16:39:14 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 320 bytes |
| コンパイル時間 | 21,830 ms |
| コンパイル使用メモリ | 401,004 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-07-16 05:47:49 |
| 合計ジャッジ時間 | 13,298 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | RE * 3 |
コンパイルメッセージ
warning: unused variable: `i`
--> src/main.rs:6:9
|
6 | for i in 0..T{
| ^ help: if this is intentional, prefix it with an underscore: `_i`
|
= note: `#[warn(unused_variables)]` on by default
warning: variable `T` should have a snake case name
--> src/main.rs:4:9
|
4 | T: usize,
| ^ help: convert the identifier to snake case: `t`
|
= note: `#[warn(non_snake_case)]` on by default
warning: comparison is useless due to type limits
--> src/main.rs:13:12
|
13 | if a < 0{
| ^^^^^
|
= note: `#[warn(unused_comparisons)]` on by default
ソースコード
use proconio::input;
fn main(){
input!{
T: usize,
}
for i in 0..T{
input!{
l: usize,
r: usize,
a: usize,
b: usize,
}
if a < 0{
println!("{}",a*l+b);
} else{
println!("{}",a*r+b);
}
}
}
Rusty