結果

問題 No.64 XORフィボナッチ数列
ユーザー dnikk
提出日時 2018-07-18 15:43:55
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 12,680 ms
コンパイル使用メモリ 386,800 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-14 15:19:45
合計ジャッジ時間 13,603 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

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,
            1 => f1,
            2 => f0 ^ f1,
            _ => panic!(),
        }
    );
}
0