結果

問題 No.112 ややこしい鶴亀算
ユーザー mmmpppmmmppp
提出日時 2017-02-27 17:47:33
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 187 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 11,544 KB
実行使用メモリ 15,384 KB
最終ジャッジ日時 2023-09-02 12:59:54
合計ジャッジ時間 3,471 ms
ジャッジサーバーID
(参考情報)
judge16 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 78 ms
15,132 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 72 ms
15,044 KB
testcase_05 AC 75 ms
15,136 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 76 ms
15,132 KB
testcase_09 AC 77 ms
15,244 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 73 ms
15,328 KB
testcase_14 AC 72 ms
15,288 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 79 ms
15,124 KB
testcase_20 AC 73 ms
15,292 KB
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 AC 77 ms
15,036 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:11: warning: assigned but unused variable - x
Main.rb:11: warning: assigned but unused variable - y
Syntax OK

ソースコード

diff #

n=gets.to_i
a=gets.split.map &:to_i
if a.uniq.size==1
  m=a[0]/(n-1)/4
  if m==0
    print n,' ',0
  else
    print 0,' ',n
  end
else
  x,y=a.minmax
  print a.count(a),' ',a.count(b)
end
0