Skip to content

Instantly share code, notes, and snippets.

@BrendenHJH
Created May 20, 2018 06:06
Show Gist options
  • Save BrendenHJH/429b75c811d3137b46c6d5723f0bdc94 to your computer and use it in GitHub Desktop.
Save BrendenHJH/429b75c811d3137b46c6d5723f0bdc94 to your computer and use it in GitHub Desktop.
백준 2935 소음
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
BigInteger n = new BigInteger(sc.nextLine());
char c = sc.nextLine().charAt(0);
BigInteger m = new BigInteger(sc.nextLine());
if(c == '*')
System.out.println(n.multiply(m));
else
System.out.println(n.add(m));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment