結果

問題 No.303 割れません
ユーザー cielciel
提出日時 2015-11-16 19:39:12
言語 Ruby
(3.3.0)
結果
AC  
実行時間 294 ms / 10,000 ms
コード長 118 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 11,344 KB
実行使用メモリ 33,796 KB
最終ジャッジ日時 2023-08-27 00:09:17
合計ジャッジ時間 5,156 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
15,616 KB
testcase_01 AC 94 ms
15,820 KB
testcase_02 AC 96 ms
15,764 KB
testcase_03 AC 183 ms
24,312 KB
testcase_04 AC 294 ms
33,796 KB
testcase_05 AC 287 ms
30,864 KB
testcase_06 AC 290 ms
31,832 KB
testcase_07 AC 239 ms
29,364 KB
testcase_08 AC 246 ms
29,388 KB
testcase_09 AC 247 ms
29,612 KB
testcase_10 AC 96 ms
15,612 KB
testcase_11 AC 291 ms
30,852 KB
testcase_12 AC 248 ms
30,512 KB
testcase_13 AC 222 ms
29,252 KB
testcase_14 AC 147 ms
21,540 KB
testcase_15 AC 143 ms
21,576 KB
testcase_16 AC 95 ms
15,776 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require'matrix'
f=->(n){(Matrix[[1,1],[1,0]]**n)[1,0]}
puts 2==(n=gets.to_i) ? [3,:INF] : [n,f[n]-(n%2>0?0:f[n/2]**2)]
0