PS/Baekjoon Online Judge
[백준 18698] The Walking Adam [Python]
kimyoungrok
2023. 5. 10. 02:59
728x90


풀이
Adam의 행동에 대한 정보가 입력으로 주어진다.
걷기에 성공할 때마다 손을 드는데, 넘어지기 전에 얼마나 많이 걸었는지 세주면 된다.
'D' 가 최초로 나오기 전까지 'U'의 개수를 세주자.
소스코드
출처
18698번: The Walking Adam
Adam has just started learning how to walk (with some help from his brother Omar), and he falls down a lot. In order to balance himself, he raises his hands up in the air (that’s a true story), and once he puts his hands down, he falls. You are given a s
www.acmicpc.net
728x90