Algorithm
백준 단어 길이 재기 2743
hyunjun's developing 🏣
2023. 8. 26. 13:56
1
2
3
4
5
6
7
8
9
|
import java.util.Scanner;
public class BOJ2743 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print(sc.next().length());
sc.close();
}
}
|
cs |
* sc.next()를 해줘서 변수에 저장해놓고 length();를 이용해 출력해도 됌.
*