結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-05-16 23:23:06 | 
| 言語 | Rust  (1.83.0 + proconio)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 672 bytes | 
| コンパイル時間 | 15,786 ms | 
| コンパイル使用メモリ | 389,924 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-14 16:38:18 | 
| 合計ジャッジ時間 | 14,927 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 WA * 20 | 
コンパイルメッセージ
warning: variable `X` should have a snake case name --> src/main.rs:15:9 | 15 | X: i64, | ^ help: convert the identifier to snake case (notice the capitalization): `x` | = note: `#[warn(non_snake_case)]` on by default warning: variable `Y` should have a snake case name --> src/main.rs:16:9 | 16 | Y: i64, | ^ help: convert the identifier to snake case (notice the capitalization): `y` warning: variable `L` should have a snake case name --> src/main.rs:17:9 | 17 | L: u64, | ^ help: convert the identifier to snake case: `l`
ソースコード
#![allow(unused_imports)]
use proconio::{
    fastout, input,
    marker::{Bytes, Chars, Isize1, Usize1},
    source::line::LineSource,
};
use std::cmp::{max, min, Ordering, Reverse};
use std::collections::*;
use std::{f64, i128, i32, i64, u128, u32, u64};
#[fastout]
fn main() {
    input! {
        X: i64,
        Y: i64,
        L: u64,
    }
    // let mut ans = 0u64;
    let x_count = (X.abs() as u64 + L - 1) / L;
    let y_count = (Y.abs() as u64 + L - 1) / L;
    let mut ans = 0;
    if (X > 0 && Y == 0) || (X == 0 && Y > 0) || (X == 0 && Y < 0) {
        ans += 1;
    } else if X < 0 {
        ans += 2
    }
    println!("{}", x_count + y_count + ans)
}