Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 534 Bytes

1086. 就不告诉你.md

File metadata and controls

29 lines (24 loc) · 534 Bytes

【PAT B-1086】就不告诉你

输入输出格式

输入在第一行给出两个不超过 1000 的正整数 A 和 B,其间以空格分隔。

在一行中倒着输出 A 和 B 的乘积。

C++代码

#include <bits/stdc++.h>
using namespace std;
using gg = long long;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    gg ai, bi;
    cin >> ai >> bi;
    ai *= bi;
    while (ai % 10 == 0)
        ai /= 10;
    while (ai != 0) {
        cout << ai % 10;
        ai /= 10;
    }
    return 0;
}