백준 2743번 단어 길이 재기(java)

마뇽미뇽·2024년 5월 2일
0

알고리즘 문제풀이

목록 보기
44/165

1.문제

https://www.acmicpc.net/problem/2743

2.풀이

string.length();를 사용한다.

3.코드

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();

        System.out.println(s.length());

        sc.close();
    }
}
profile
Que sera, sera

0개의 댓글