結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,140 KB
testcase_01 AC 81 ms
15,136 KB
testcase_02 AC 80 ms
15,188 KB
testcase_03 AC 83 ms
15,116 KB
testcase_04 AC 81 ms
15,336 KB
testcase_05 AC 80 ms
15,076 KB
testcase_06 AC 81 ms
15,012 KB
testcase_07 AC 81 ms
15,336 KB
testcase_08 AC 82 ms
15,376 KB
testcase_09 AC 85 ms
15,400 KB
testcase_10 AC 99 ms
18,244 KB
testcase_11 AC 98 ms
17,640 KB
testcase_12 AC 95 ms
17,116 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 127 ms
22,008 KB
testcase_27 WA -
testcase_28 AC 129 ms
22,196 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
elsif N == 4
    puts A.sort[2]
else
    puts A.sort[1]
end
0