結果

問題 No.570 3人兄弟(その1)
ユーザー muu16muu16
提出日時 2018-09-01 14:58:47
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 11,916 KB
実行使用メモリ 16,100 KB
最終ジャッジ日時 2023-10-18 22:27:14
合計ジャッジ時間 1,526 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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