1010 一元多项式求导 (25 分)

#include<iostream>
using namespace std;
int main() {
	int a, b, flag = 0;
	while (cin >> a >> b) {
		if (flag == 1 && b !=0) cout << " ";
		if (b != 0) {
			cout << a * b << " " << b - 1;
			flag = 1;
		}
	}
	if (flag == 0) cout << "0 0";
	return 0;
}
posted @ 2019-02-01 22:55  Cirno-9  阅读(129)  评论(0编辑  收藏  举报