一元多項式求導(c++)
#include <stdio.h>
#include <iostream>
int main() {
int a, b;
bool first = true;
while (std::cin >> a >> b) {
if (b != 0 && a != 0) {
if (!first) {
std::cout << " ";
}
std::cout << a * b << " " << b - 1;
first = false;
}
}
if (first) {
std::cout << "0 0";
}
return 0;
}