AtCoder

CPSCO2019 Session4

CPSCO2019 Session4 - AtCoder A - Swimming l, x = gets.split.map(&:to_i) n = x / l puts n.even? ? x % l : (n + 1) * l - x B - Meeting n, d = gets.split.map(&:to_i) table = d.times.map do gets.chomp.chars.map.with_index {|st, i| i if st == "…

AtCoder(AtCoder Beginners Selection)

AtCoder Beginners Selection - AtCoder PracticeA - はじめてのあっとこーだー(Welcome to AtCoder) a = gets.to_i b, c = gets.split.map(&:to_i) s = gets print "#{a + b + c} #{s}" ABC086A - Product a, b = gets.split.map(&:to_i) puts (a * b).od…