#include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c;
string s;//358
string one, two, three;
int o, t, th;
cin >> a;
cin >> b;
s = to_string(b);
one = s.substr(2, 1);
two = s.substr(1, 1);
three = s.substr(0, 1);
o = stoi(one);
t = stoi(two);
th = stoi(three);
cout << o * a << endl;
cout << t *a << endl;
cout << th *a << endl;
cout << b * a << endl;
return 0;
}
'Programming > Algorithm' 카테고리의 다른 글
백준 2480번 (0) | 2022.03.12 |
---|---|
백준 2525번 >> 못품 (0) | 2022.03.12 |
백준 2884번 (0) | 2022.03.12 |