結果

問題 No.72 そろばん Med
ユーザー cra77756176
提出日時 2022-12-25 20:09:47
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 273 bytes
コンパイル時間 13,922 ms
コンパイル使用メモリ 377,716 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-19 10:41:14
合計ジャッジ時間 12,174 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

const DIVISOR: u128 = 10u128.pow(6) + 7;

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let n: u128 = n.trim().parse().unwrap();

    let max = (((n / 2) + 1) * ((n / 2) + (n & 1) + 1) - 1) % DIVISOR;

    println!("{max}");
}
0