SWEA [D1] 신문 헤드라인 - 2047 JAVA

YB·2026년 5월 5일
post-thumbnail

링크텍스트

설명

풀이 흐름 설명

자바에서 제공하는 toUpperCase() 메서드를 사용해 문자열 안의 알파벳을 모두 대문자로 변환하였다. 변환된 문자열은 System.out.println()으로 그대로 출력하였다.
시간복잡도: O(N), 공간복잡도: O(N)

회독

  • [ x ] 1회
  • 2회
  • 3회

코드

import java.util.Scanner;
import java.io.FileInputStream;

class Solution
{
	public static void main(String args[]) throws Exception
	{
		Scanner sc = new Scanner(System.in);
		
        String s = sc.next();
		
        System.out.println(s.toUpperCase());
	}
}

profile
안녕하세요

0개의 댓글