puts "aの値を入力してください" a = gets.to_i puts "bの値を入力してください" b = gets.to_i if b%a == 0 puts b/a elsif a%b != 0 puts b/a + 1 end