import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int one = sc.nextInt();
int two = sc.nextInt();
int three = one * (two % 10);
System.out.println(three);
int four = (one * ((two % 100) / 10)) * 10;
System.out.println(four/10);
int five = one * (two / 100) * 100;
System.out.println(five/100);
System.out.println(three + four + five);
sc.close();
}
}
123
백의 자리 : 123 / 100
십의 자리 : 123 % 100 / 10 << 와 이거 어려웠다
일의 자리 : 123 % 10 << ㅠㅠ어렵다
'Coding Test > Baekjoon' 카테고리의 다른 글
[백준] 10172번 개 (자바 java) Escape Sequence (0) | 2023.02.02 |
---|---|
[백준] 10171번 고양이 (자바 java) (0) | 2023.02.01 |
[백준] 10430번 나머지 (자바 java) (0) | 2023.02.01 |
[백준] 3003번 킹, 퀸, 룩, 비숍, 나이트, 폰 (자바 java) (0) | 2023.02.01 |
[백준] 18108번 1998년생인 내가 태국에서는 2541년생?! (자바 java) (0) | 2023.02.01 |