結果

問題 No.64 XORフィボナッチ数列
ユーザー 綾地寧々綾地寧々
提出日時 2015-05-18 18:17:10
言語 PHP
(8.3.4)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 315 bytes
コンパイル時間 958 ms
コンパイル使用メモリ 18,580 KB
実行使用メモリ 19,324 KB
最終ジャッジ日時 2023-09-20 09:55:15
合計ジャッジ時間 1,074 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
19,324 KB
testcase_01 AC 17 ms
19,272 KB
testcase_02 AC 17 ms
19,180 KB
testcase_03 AC 16 ms
19,300 KB
testcase_04 AC 16 ms
19,180 KB
testcase_05 AC 16 ms
19,248 KB
testcase_06 AC 16 ms
19,200 KB
testcase_07 AC 16 ms
19,208 KB
testcase_08 AC 16 ms
19,172 KB
testcase_09 AC 16 ms
19,288 KB
testcase_10 AC 16 ms
19,296 KB
testcase_11 AC 16 ms
19,248 KB
testcase_12 AC 16 ms
19,060 KB
testcase_13 AC 16 ms
19,084 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
list($zero, $one, $n) = explode(" ",trim(fgets(STDIN)));
$gmp_output = array();
$gmp_output[0] = gmp_init($zero);
$gmp_output[1] = gmp_init($one);
$gmp_output[2] = gmp_xor($gmp_output[0], $gmp_output[1]);
$gmp_n = gmp_init($n);
echo gmp_strval($gmp_output[gmp_intval(gmp_div_r($gmp_n,gmp_init(3)))]).PHP_EOL;
0