結果

問題 No.64 XORフィボナッチ数列
ユーザー TatsuDX
提出日時 2016-09-08 23:42:23
言語 Java
(openjdk 23)
結果
AC  
実行時間 146 ms / 5,000 ms
コード長 338 bytes
コンパイル時間 3,578 ms
コンパイル使用メモリ 74,216 KB
実行使用メモリ 41,532 KB
最終ジャッジ日時 2024-11-15 22:29:02
合計ジャッジ時間 6,317 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long a = sc.nextLong(), b = sc.nextLong(), c = a^b, n = sc.nextLong();
		if(n%3 == 0){
			System.out.println(a);
		} else if(n%3 == 1){
			System.out.println(b);
		} else {
			System.out.println(c);
		}
	}
}
0