Java Stdin and Stdout II

윤지현·2025년 3월 15일
0

HackerRank[Java]

목록 보기
17/57
  • 문제
  • 정답
import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i = scan.nextInt();
        double d = scan.nextDouble();
        
        scan.nextLine();
        String s = scan.nextLine();

        System.out.println("String: " + s);
        System.out.println("Double: " + d);
        System.out.println("Int: " + i);
        
        scan.close();
    }
}
  • 결과
profile
첫 시작

0개의 댓글