結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-29 20:30:03 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 5,000 ms |
| コード長 | 486 bytes |
| コンパイル時間 | 4,498 ms |
| コンパイル使用メモリ | 114,320 KB |
| 実行使用メモリ | 19,328 KB |
| 最終ジャッジ日時 | 2024-11-29 18:37:40 |
| 合計ジャッジ時間 | 2,081 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
long[] n = Console.ReadLine().Split().Select(a => long.Parse(a)).ToArray();
if(n[2] % 3 == 0)
{
Console.WriteLine($"{n[0]}");
}
else if(n[2] % 3 == 1)
{
Console.WriteLine($"{n[1]}");
}
else
{
Console.WriteLine($"{n[0] ^ n[1]}");
}
}
}