码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2021-02-16 11:53:11      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:sys   求导   use   ring   code   else   a*   end   turn   

如果求导之后没有任何非零项,需要输出0 0。

int main()
{
    string line;
    getline(cin,line);
    stringstream ss(line);

    int a,b;
    bool first=true;
    while(ss>>a>>b)
    {
        a*=b;
        b--;
        if(b<0) break;
        if(first) cout<<a<<‘ ‘<<b;
        else cout<<‘ ‘<<a<<‘ ‘<<b;
        first=false;
    }

    if(first) cout<<0<<‘ ‘<<0<<endl;

    //system("pause");
    return 0;
}

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

标签:sys   求导   use   ring   code   else   a*   end   turn   

原文地址:https://www.cnblogs.com/fxh0707/p/14398614.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!