結果

問題 No.111 あばばばば
ユーザー kyotoku1483
提出日時 2025-09-07 11:00:10
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 205 bytes
コンパイル時間 16,921 ms
コンパイル使用メモリ 384,480 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-07 11:00:28
合計ジャッジ時間 15,165 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#[allow(unused)]
use proconio::{input, marker::Chars};

fn main() {
    input! {
        l: usize,
    }
    let a = (l - 1) / 2;
    let b = a - 1;
    println!("{}", a * (a + 1) / 2 + b * (b + 1) / 2)
}
0