--正文
直接算就好
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; long a1,a2,b1,b2; int main(){ while (scanf("%ld+%ldi %ld+%ldi",&a1,&b1,&a2,&b2)!= EOF){ printf("%ld+%ldi ",a1+a2,b1+b2); } return 0; }