https://www.acmicpc.net/submit/2588
#include <iostream>
#include <string>
using namespace std;
int main() {
int first, second;
cin >> first >> second;
string secondS = to_string(second);
for (int j = 2; j >= 0; j--) {
string num = secondS.substr(j,1);
cout << stoi(num)*first << '\n';
}
cout << first * second;
}
'Programming > Algorithm' 카테고리의 다른 글
[C++]백준 2920번 : 음계 (0) | 2019.02.04 |
---|---|
[C++]백준 8958번 : OX퀴즈 (0) | 2019.02.04 |
[C++]백준 1934번 : 최소 공배수 (0) | 2019.02.03 |
[C++]백준 10039번 : 평균 점수 (0) | 2019.02.03 |
[C++]백준 2577번 : 숫자의 개수 (0) | 2019.02.03 |