結果

問題 No.1415 100の倍数かつ正整数(1)
コンテスト
ユーザー elphe
提出日時 2026-01-15 14:23:02
言語 Rust
(1.92.0 + proconio + num)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 399 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 26,113 ms
コンパイル使用メモリ 414,508 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-01-15 14:23:30
合計ジャッジ時間 26,711 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use proconio::{fastout, input, marker::Bytes};

#[fastout]
fn main() {
    input! {
        n: Bytes,
    }

    println!("{}", output(solve(n)))
}

fn solve(mut n: Vec<u8>) -> Vec<u8> {
    if *n.first().unwrap() == b'-' || n.len() <= 2 {
        vec![b'0']
    } else {
        n.pop();
        n.pop();
        n
    }
}

fn output(ans: Vec<u8>) -> String {
    String::from_utf8(ans).unwrap()
}
0