알고리즘 문제/BOJ
2588번 곱셈
parkit
2018. 11. 5. 22:18
728x90
반응형
https://www.acmicpc.net/problem/2588
쉬운 문제이다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #include <iostream> #include <queue> #include <stack> #include <cstdio> #include <vector> #include <cstring> #include <string> #include <math.h> #include <algorithm> #include <map> using namespace std; int first = 0, second = 0; void simulation() { int hundred = second / 100; int ten = (second % 100) / 10; int one = second % 10; printf("%d\n", first * one); printf("%d\n", first * ten); printf("%d\n", first * hundred); printf("%d\n", first * second); } int main(void) { scanf("%d %d", &first, &second); simulation(); return 0; } | cs |
728x90
반응형