結果
問題 |
No.44 DPなすごろく
|
ユーザー |
![]() |
提出日時 | 2023-01-05 10:17:28 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 12,768 ms |
コンパイル使用メモリ | 378,592 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-28 23:27:25 |
合計ジャッジ時間 | 13,110 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
コンパイルメッセージ
warning: variable does not need to be mutable --> src/main.rs:4:6 | 4 | let mut n: u64 = n.trim().parse().unwrap(); | ----^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default
ソースコード
fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let mut n: u64 = n.trim().parse().unwrap(); let (mut a, mut b, mut c) = (1u64, 0u64, 0u64); for _ in 0..n { c = a + b; b = a; a = c; } println!("{}", c); }