結果

問題 No.344 ある無理数の累乗
ユーザー mmmpppmmmppp
提出日時 2017-03-08 12:32:02
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 114 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 11,448 KB
実行使用メモリ 19,552 KB
最終ジャッジ日時 2023-09-05 23:34:07
合計ジャッジ時間 5,601 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,288 KB
testcase_01 AC 74 ms
15,168 KB
testcase_02 AC 74 ms
15,316 KB
testcase_03 AC 76 ms
15,356 KB
testcase_04 AC 74 ms
15,320 KB
testcase_05 AC 78 ms
15,168 KB
testcase_06 AC 78 ms
15,316 KB
testcase_07 AC 75 ms
15,288 KB
testcase_08 AC 79 ms
15,088 KB
testcase_09 AC 77 ms
15,128 KB
testcase_10 AC 80 ms
15,296 KB
testcase_11 AC 75 ms
15,128 KB
testcase_12 AC 79 ms
15,136 KB
testcase_13 AC 95 ms
15,144 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=[2,2]
f=->n{a[n]?a[n]:(f[n-1]+f[n-2]<<1)%1000}
b=f[n=gets.to_i]
p n&1<1?b-1:b
f=->n{a[n]?a[n]:2*a[n-1]+2*a[n-2]}
0