結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
|
提出日時 | 2018-07-18 15:37:13 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 413 bytes |
コンパイル時間 | 12,342 ms |
コンパイル使用メモリ | 396,292 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 15:04:32 |
合計ジャッジ時間 | 13,625 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
fn main() {let mut input = String::new();std::io::stdin().read_line(&mut input).ok();let input = input.split_whitespace().map(|x| x.parse::<u64>().unwrap()).collect::<Vec<_>>();let (f0, f1, n) = (input[0], input[1], input[2]);println!("{}",match n % 3 {0 => f0,2 => f0 ^ f1,_ => f1,});}