結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
15,800 KB
testcase_01 AC 92 ms
15,856 KB
testcase_02 AC 93 ms
15,620 KB
testcase_03 AC 217 ms
24,456 KB
testcase_04 AC 280 ms
33,708 KB
testcase_05 AC 272 ms
30,492 KB
testcase_06 AC 277 ms
31,776 KB
testcase_07 AC 229 ms
28,808 KB
testcase_08 AC 235 ms
29,088 KB
testcase_09 AC 233 ms
29,320 KB
testcase_10 AC 88 ms
15,676 KB
testcase_11 AC 275 ms
30,724 KB
testcase_12 AC 237 ms
30,300 KB
testcase_13 AC 214 ms
29,208 KB
testcase_14 AC 139 ms
21,444 KB
testcase_15 AC 137 ms
21,544 KB
testcase_16 AC 90 ms
15,748 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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