달마루
기획자에서 개발자로
달마루
전체 방문자
오늘
어제
  • 분류 전체보기 (334)
    • 기획 이야기 (3)
    • 개발자로 전향한 이유 (1)
    • Github Address (1)
    • 개발자, 그 여정 (11)
      • 기초특강 (4)
      • 국비학원 선정 (4)
      • BitCamp_수업내용 (1)
      • 학원 프로젝트 후기 (1)
      • 정보처리기사 (1)
      • 개발 이야기 (0)
    • 개념 창고 (126)
      • JAVA (50)
      • CS (1)
      • Database (27)
      • NetWork (2)
      • 자료 구조 (2)
      • React (8)
      • Spring (3)
      • JPA (1)
      • HTML & CSS (18)
      • JS (3)
    • algorithm (186)
      • 백준 (161)
      • 프로그래머스 (23)
    • 사는 이야기 (0)

블로그 메뉴

  • Github
  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • Scanner
  • 문제풀이
  • select
  • BOJ
  • 혼공SQL
  • 혼자공부하는SQL
  • 백준
  • BRONZE
  • 알고리즘
  • BOJ algorithm
  • MySQL
  • Bronze V
  • 백준문제풀이
  • Bronze III
  • Algorithm
  • Bronze IV
  • HTML
  • 혼공MySQL
  • SQL고득점Kit
  • math
  • react
  • programmers
  • 알고리즘풀이
  • SQL
  • java algorithm
  • sql 문제풀이
  • 백준알고리즘
  • java
  • 프로그래머스
  • 자바

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
달마루

기획자에서 개발자로

[백준] CAPS - 15000 Java[자바]
algorithm/백준

[백준] CAPS - 15000 Java[자바]

2023. 3. 25. 22:06

[Unrated] CAPS - 15000

문제 링크

 

15000번: CAPS

Earth is under attack! Messages need to be sent to the Earth Defense Force (EDF) that makes clear that the situation is dire. The EDF’s strongest forces consist of mechs (huge bipedal robots) that are piloted by Japanese teenagers. To make sure that the

www.acmicpc.net

성능 요약

메모리: 31256 KB, 시간: 520 ms

분류

구현, 문자열

문제 설명

Earth is under attack! Messages need to be sent to the Earth Defense Force (EDF) that makes clear that the situation is dire. The EDF’s strongest forces consist of mechs (huge bipedal robots) that are piloted by Japanese teenagers. To make sure that the messages come across as urgent, they must be displayed on the monitors of the pilots in uppercase letters. Unfortunately, the tachyon communication system that is used by the EDF is only able to send strings in lower-case alphabetic characters.

The set of lower-case alphabetic characters is made up of the following characters: ’a’, ’b’, ’c’, ’d’, ’e’, ’f’, ’g’, ’h’, ’i’, ’j’, ’k’, ’l’, ’m’, ’n’, ’o’, ’p’, ’q’, ’r’, ’s’, ’t’, ’u’, ’v’, ’w’, ’x’, ’y’, ’z’.

Your job is to write a program that converts the given messages to upper-case.

입력

  • A single line containing a string of length n (100 ≤ n ≤ 106), consisting of lower-case alphabetic characters.

출력

  • A single line containing the input string where all letters are converted to upper-case letters.

답 : toUpperCase 를 통해 소문자로 변환한다. 

import java.util.Scanner;

public class Main {
        public static void main(String[] args) {
                Scanner sc = new Scanner(System.in);
                String input = sc.nextLine(); // 소문자를 입력 받음
                String output = input.toUpperCase(); // 입력받은 소문자를 대문자로 변환
                System.out.println(output);
                sc.close();
        }
}
저작자표시 비영리 변경금지 (새창열림)

'algorithm > 백준' 카테고리의 다른 글

[백준] SASA 모형을 만들어보자 -23825 Java[자바]  (0) 2023.03.27
[백준] Dedupe - 5357 Java[자바]  (0) 2023.03.26
[백준] 사장님 도박은 재미로 하셔야 합니다 - 23795 Java[자바]  (0) 2023.03.24
[백준] 공백 없는 A+B - 15873 Java[자바]  (0) 2023.03.23
[백준] 등장하지 않는 문자의 합 - 3059 Java[자바]  (0) 2023.03.22
    'algorithm/백준' 카테고리의 다른 글
    • [백준] SASA 모형을 만들어보자 -23825 Java[자바]
    • [백준] Dedupe - 5357 Java[자바]
    • [백준] 사장님 도박은 재미로 하셔야 합니다 - 23795 Java[자바]
    • [백준] 공백 없는 A+B - 15873 Java[자바]
    달마루
    달마루
    항상 어제보다 좋은 코드를 지향합니다. https://github.com/LimDongHyun99

    티스토리툴바