import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int num1 =sc.nextInt();
int num2 =sc.nextInt();
System.out.println(num1+num2);
}
}
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int num1= sc.nextInt();
int num2= sc.nextInt();
System.out.println(num1*(num2%10));
System.out.println(num1*((num2-(num2%10)-((num2/100)*100))/10)); // num1 *((num2%100)/10) 쉬운 방법이 있었다..
System.out.println(num1*(num2/100));
System.out.println((num1*num2));
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int A = in.nextInt();
String B = in.next();
in.close();
System.out.println(A * (B.charAt(2) - '0'));
System.out.println(A * (B.charAt(1) - '0'));
System.out.println(A * (B.charAt(0) - '0'));
System.out.println(A * Integer.parseInt(B));
}
}
Integer.parseInt
은 문자를 인트로 바꿔주는 방법Reference: -[백준] 2588번 : 곱셈 - JAVA [자바]_ Strong’s LAB