Project Euler Problem 13
問題
Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 ・ ・ (略) ・ ・ 53503534226472524250874054075591789781264330331690
ソース
num = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, ・・・(略)・・・ 53503534226472524250874054075591789781264330331690 ] puts num.inject(:+).to_s[0...10]
解答
76576500
感想
Rubyってせこいね〜