結果

問題 No.570 3人兄弟(その1)
ユーザー muu16muu16
提出日時 2018-09-01 15:30:32
言語 Ruby
(3.3.0)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 523 bytes
コンパイル時間 46 ms
コンパイル使用メモリ 11,896 KB
実行使用メモリ 16,080 KB
最終ジャッジ日時 2023-10-19 01:50:54
合計ジャッジ時間 1,391 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
16,080 KB
testcase_01 AC 89 ms
16,080 KB
testcase_02 AC 89 ms
16,080 KB
testcase_03 AC 91 ms
16,080 KB
testcase_04 AC 90 ms
16,080 KB
testcase_05 AC 89 ms
16,080 KB
testcase_06 AC 90 ms
16,080 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

abc = gets.chomp.to_i
abc1 = gets.chomp.to_i
abc2 = gets.chomp.to_i
akun = abc
bkun = abc1
ckun = abc2

d = [akun,bkun,ckun]
e = d.sort.reverse

if d.index(e[0]) == 0 then
  puts "A"
end
if d.index(e[0]) == 1 then
  puts "B"
end
if d.index(e[0]) == 2 then
  puts "C" 
end
if d.index(e[1]) == 0 then
  puts "A"
end
if d.index(e[1]) == 1 then
  puts "B"
end
if d.index(e[1]) == 2 then
  puts "C"
end
if d.index(e[2]) == 0 then
  puts "A"
end
if d.index(e[2]) == 1 then
  puts "B"
end
if d.index(e[2]) == 2 then
  puts "C"
end
0