ejejej3   3년 전

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main{

public static void main(String[] args) throws IOException{
Scanner scn = new Scanner(System.in);
int testCase = scn.nextInt();
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int sum = 0;
while(testCase-- > 0){
sum += Character.getNumericValue(in.read());
}
System.out.println(sum);
}
}

댓글을 작성하려면 로그인해야 합니다.