結果
問題 |
No.1822 Keima of Shogi
|
ユーザー |
|
提出日時 | 2022-03-11 11:43:11 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 24,909 ms |
コンパイル使用メモリ | 382,720 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-15 11:41:35 |
合計ジャッジ時間 | 17,668 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
use std::io; fn main() { let mut buf = String::new(); io::stdin().read_line(&mut buf) .expect("Failed to read line"); let n: i64 = buf.trim().parse() .expect("not integer"); let l = (n-1) / 2 + 1; let ans = (l + 1) * l / 2; println!("{}", ans); }