結果

問題 No.64 XORフィボナッチ数列
ユーザー itezpace
提出日時 2016-08-21 13:05:32
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 384 bytes
コンパイル時間 3,079 ms
コンパイル使用メモリ 73,784 KB
実行使用メモリ 41,344 KB
最終ジャッジ日時 2024-11-07 22:25:16
合計ジャッジ時間 5,710 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Yuki64 {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = a^b;
    long n = sc.nextLong();
    long x = 0;
    if(n%3==0){
      x = a;
    } else if(n%3==1){
      x = b;
    } else if(n%3==2){
      x = c;
    }
    System.out.println(x);
  }
}
0