結果

問題 No.112 ややこしい鶴亀算
ユーザー らっしー(raccy)らっしー(raccy)
提出日時 2014-12-24 00:01:26
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 11,556 KB
実行使用メモリ 15,400 KB
最終ジャッジ日時 2023-09-02 22:22:57
合計ジャッジ時間 4,058 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
15,092 KB
testcase_01 AC 100 ms
15,228 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 87 ms
15,336 KB
testcase_05 AC 93 ms
15,104 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 98 ms
15,052 KB
testcase_09 AC 94 ms
15,104 KB
testcase_10 WA -
testcase_11 AC 86 ms
15,264 KB
testcase_12 WA -
testcase_13 AC 89 ms
15,140 KB
testcase_14 AC 90 ms
15,140 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 86 ms
15,228 KB
testcase_20 AC 88 ms
15,112 KB
testcase_21 WA -
testcase_22 AC 85 ms
15,052 KB
testcase_23 WA -
testcase_24 AC 84 ms
15,260 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
list = gets.split.map(&:to_i)
ma = list.max
mi = list.min

t = 0
k = 0
if ma == mi
  if ma == (list.size - 1) * 4
    t = list.size
  else
    k = list.size
  end
else
  list.each do |i|
    if i == ma
      t += 1
    else
      k += 1
    end
  end
end
puts [k, t].join(" ")
0