結果

問題 No.1491 銀将
ユーザー maguroflymagurofly
提出日時 2021-04-30 21:24:44
言語 Ruby
(3.2.2)
結果
AC  
実行時間 89 ms / 1,000 ms
コード長 75 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 11,368 KB
実行使用メモリ 15,384 KB
最終ジャッジ日時 2023-09-26 04:22:13
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,260 KB
testcase_01 AC 81 ms
15,104 KB
testcase_02 AC 81 ms
15,312 KB
testcase_03 AC 79 ms
15,116 KB
testcase_04 AC 80 ms
15,180 KB
testcase_05 AC 80 ms
15,348 KB
testcase_06 AC 78 ms
15,192 KB
testcase_07 AC 80 ms
15,048 KB
testcase_08 AC 79 ms
15,296 KB
testcase_09 AC 81 ms
15,084 KB
testcase_10 AC 81 ms
15,308 KB
testcase_11 AC 80 ms
15,364 KB
testcase_12 AC 81 ms
15,140 KB
testcase_13 AC 80 ms
15,384 KB
testcase_14 AC 80 ms
15,160 KB
testcase_15 AC 81 ms
15,332 KB
testcase_16 AC 81 ms
15,244 KB
testcase_17 AC 81 ms
15,364 KB
testcase_18 AC 80 ms
15,120 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

K = gets.to_i
L = 2 * K + 1
M = 2 * K - 1
p (L**2 + 1) / 2 + (M**2 + 1) / 2
0