先用getline讀整行再用stringstream把那行讀入longlongint
例如:
getline(cin, str)
stringstream ss(str)
while(ss >> n)
sum += n
cout << sum;
類似這樣