結果

問題 No.480 合計
コンテスト
ユーザー taba
提出日時 2024-07-30 09:45:27
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 286 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 912 ms
コンパイル使用メモリ 199,236 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-03 19:09:24
合計ジャッジ時間 1,882 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: function `proc` is never used
 --> src/main.rs:9:4
  |
9 | fn proc(a: u64, b: u64) -> u64 {
  |    ^^^^
  |
  = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

ソースコード

diff #
raw source code

fn main() {
    proconio::input! {
        l: u64,
    }
    let ans = (1..=l).sum::<u64>();
    println!("{ans}");
}

fn proc(a: u64, b: u64) -> u64 {
    b.div_ceil(a)
}

#[cfg(test)]
mod test {
    use super::*;
    #[test]
    fn test() {
        assert_eq!(proc(2, 5), 3);
    }
}
0