https://www.acmicpc.net/problem/2743
2743번: 단어 길이 재기
알파벳으로만 이루어진 단어를 입력받아, 그 길이를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
입력
첫째 줄에 영어 소문자와 대문자로만 이루어진 단어가 주어진다. 단어의 길이는 최대 100이다.
출력
첫째 줄에 입력으로 주어진 단어의 길이를 출력한다.
코드
print(len(input()))
메모)
input():
In Python, the input() function is used to take user input from the console. When input() is called, the program will pause and wait for the user to enter some text followed by pressing the "Enter" key. The entered text is then returned as a string.
'IT학습 > CodingTest' 카테고리의 다른 글
[백준/Bronze V] 별 찍기 - 1 - 2438 (0) | 2024.01.18 |
---|---|
[백준/Bronze V] 사칙연산 - 10869 (0) | 2024.01.18 |
[백준/Bronze V] 새싹 - 25083 (0) | 2024.01.14 |
[백준/Bronze V] 고양이 - 10171 (0) | 2024.01.10 |
[백준/Bronze V] 두 수 비교하기 - 1330 (0) | 2024.01.06 |