結果

問題 No.111 あばばばば
ユーザー zazaboonzazaboon
提出日時 2017-01-23 16:08:22
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 87 bytes
コンパイル時間 631 ms
コンパイル使用メモリ 11,188 KB
実行使用メモリ 19,900 KB
最終ジャッジ日時 2023-08-24 21:26:49
合計ジャッジ時間 7,094 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,304 KB
testcase_01 AC 79 ms
15,128 KB
testcase_02 AC 81 ms
15,296 KB
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.chomp.to_i
n = a
ans = 0
while(n > 2)
  ans += (a - n + 1)
  n-=2
end
puts ans
0