require 'bigdecimal' require 'bigdecimal/util' a=gets.to_i printf "%02d:%02d", 10.to_d+a.to_d/100.to_d, 6*(a%100)/10.to_d