Yukicoder No.113 宝探し
perlではtailsさんに勝てずなのでrubyをした。
solution
N E W Sをそれぞれ数えて軸ごとに差をとってhypot。
implementation
ruby $61$byte
p eval'Math.hypot '+'N-S,E-W'.gsub(/\w/,&gets.method(:count))
perlではtailsさんに勝てずなのでrubyをした。
N E W Sをそれぞれ数えて軸ごとに差をとってhypot。
ruby $61$byte
p eval'Math.hypot '+'N-S,E-W'.gsub(/\w/,&gets.method(:count))