ioread = io.read('*a'):gmatch('%d+')
function readNumber()
return tonumber(ioread())
end
local G1 = readNumber() S1 = readNumber() K1 = readNumber()
local G2 = readNumber() S2 = readNumber() K2 = readNumber()
local G = G1 + G2 S = S1 + S2 K = K1 + K2
S = S + (K >= 29 and 1 or 0)
G = G + (S >= 17 and 1 or 0)
K = K % 29
S = S % 17
print(G .. "." .. S .. "." .. K)
用LUA(和C++)刷PAT (Advanced Level) ——1058 A+B in Hogwarts
最新推荐文章于 2021-09-05 16:10:52 发布