这道题不用考虑10*1 ----> 01 ,直接输出1就OK
输入格式:
输入在第一行给出两个不超过 1000 的正整数 A 和 B,其间以空格分隔。
输出格式:
在一行中倒着输出 A 和 B 的乘积。
输入样例:
5 7
输出样例:
53
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4+10;
int main()
{
int n,m;cin>>n>>m;
int x = n*m;
int ans = 0;
while(x!=0)
{
ans = ans*10 + x%10;
x = x/10;
}
cout<<ans<<endl;
return 0;
}
/*
5
A12345 0 PK
B24543 98 pk
T98754 100 IJ
B34543 99 IJ
T53454 0 UP
*/