結果

問題 No.1816 MUL-DIV Game
ユーザー maguroflymagurofly
提出日時 2022-01-21 21:51:52
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 155 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 11,552 KB
実行使用メモリ 23,808 KB
最終ジャッジ日時 2023-08-17 05:42:51
合計ジャッジ時間 4,746 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,288 KB
testcase_01 AC 86 ms
15,340 KB
testcase_02 AC 81 ms
15,164 KB
testcase_03 AC 80 ms
15,016 KB
testcase_04 AC 80 ms
15,276 KB
testcase_05 AC 82 ms
15,300 KB
testcase_06 AC 82 ms
15,024 KB
testcase_07 AC 82 ms
15,240 KB
testcase_08 AC 81 ms
15,236 KB
testcase_09 AC 85 ms
15,424 KB
testcase_10 AC 99 ms
18,008 KB
testcase_11 AC 98 ms
17,744 KB
testcase_12 AC 97 ms
17,028 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 129 ms
22,160 KB
testcase_27 WA -
testcase_28 AC 128 ms
22,128 KB
testcase_29 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
A = gets.split.map(&:to_i)

if N == 1
    puts A[0]
elsif N == 2
    puts A[0] * A[1]
elsif N.odd?
    puts 1
else
    puts A.sort[N / 2]
end
0