BOJ: Bronze V #2338 [Solved]

https://www.acmicpc.net/problem/2338

Java
package test;
import java.math.*;
import java.util.Scanner;
public class testclass {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger a = sc.nextBigInteger();
		BigInteger b = sc.nextBigInteger();
		sc.close();
		
		System.out.println(a.add(b));
		System.out.println(a.subtract(b));		
		System.out.println(a.multiply(b));
	}
}

Status: Solved

백준 (solved.ac) Bronze V 2338번 문제입니다. 규칙적으로 해야되는데 그러질 못하고 있네요.

1 Like
Haskell
main = do
    s <- getContents
    let [a, b] = map read $ words s
    mapM_ print $ uncurry <$> [(+), (-), (*)] <*> pure (a, b)
2 Likes