RosettaCodeData/Task/A+B/Relation/a+b.relation

5 lines
141 B
Plaintext

set input = "2 2"
set a = regexreplace(input,"^(-?\d+)\s+(-?\d+)+$","$1")
set b = regexreplace(input,"^(-?\d+)\s+(-?\d+)+$","$2")
echo a + b