공부기록/SWEA

[SWEA] 3260번 두 수의 덧셈 - BigDecimal

메델 2023. 10. 27. 00:25
import java.math.BigDecimal;
import java.util.Scanner;

public class Solution {
    
    public static void main(String[] args) {
    	
    	Scanner kb = new Scanner(System.in);
    	
    	int T = kb.nextInt();
    	
    	for(int i=1; i<=T; i++) {
    		BigDecimal a= new BigDecimal(kb.next());
    		BigDecimal b= new BigDecimal(kb.next());
    		System.out.println("#"+ i+ " "+ a.add(b));
    	}
    }
}