結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
atetubou
|
| 提出日時 | 2015-06-22 14:40:34 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 294 bytes |
| コンパイル時間 | 11,013 ms |
| コンパイル使用メモリ | 223,044 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-10 19:06:14 |
| 合計ジャッジ時間 | 11,641 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 4 WA * 7 |
ソースコード
package main
import (
// "bufio"
// "os"
"fmt"
// "unicode/utf8"
)
func main(){
var f0, f1, n int
fmt.Scanf("%d%d%d", &f0, &f1, &n)
if n == 0 {
fmt.Println(f0)
}else if n == 1 {
fmt.Println(f1)
}else {
f0 = f0 ^ f1
fmt.Printf("%d\n", (n & 1) * f1 + (1 - (n & 1)) * f0)
}
}
atetubou