美文网首页工作生活
PAT 1086 就不告诉你 (15 分)

PAT 1086 就不告诉你 (15 分)

作者: 昭明ZMing | 来源:发表于2019-07-03 10:53 被阅读0次
#include<iostream>
#include<string>
using namespace std;
int main() {
    int a, b;
    cin >> a >> b;
    string str = to_string(a*b);
    cout << stoi(string(str.rbegin(), str.rend()));  //数字倒叙输出
    return 0;
}
//最后输出的是数字,需要去除字符前的0

相关文章

网友评论

    本文标题:PAT 1086 就不告诉你 (15 分)

    本文链接:https://www.haomeiwen.com/subject/lhxqhctx.html