結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2017-01-19 16:17:30 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 140 ms / 5,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 2,272 ms |
コンパイル使用メモリ | 75,068 KB |
実行使用メモリ | 41,548 KB |
最終ジャッジ日時 | 2024-12-23 01:30:45 |
合計ジャッジ時間 | 4,742 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);long[] f = new long[3];f[0] = sc.nextLong();f[1] = sc.nextLong();f[2] = f[0] ^ f[1];long n = sc.nextLong();System.out.println(f[(int) (n % 3)]);}}