입력: 이후 K개의 줄에 정수가 1개씩 주어진다. 정수는 0에서 1,000,000 사이의 값을 가지며, 정수가 "0" 일 경우에는 가장 최근에 쓴 수를 지우고, 아닐 경우 해당 수를 쓴다. ↔️ On each of the next K lines, there will either be one integer between 1 and 100 (inclusive), or the integer 0.
출력: 최종적으로 적어낸 수의 합은 231-1보다 작거나 같은 정수이다. ↔️ You can assume that the output will be an integer in the range 0 and 1 000 000 (inclusive).
그리고, 문제가 되지 않을 수야 있겠지만:
첫 번째 줄에 정수 K가 주어진다. (1 ≤ K ≤ 100,000) 이후 K개의 줄에 정수가 1개씩 주어진다. ↔️ The first line of input contains the integer K (1 ≤ K ≤ 100 000) which is the number of integers (including “zero”) your boss will say.
입력되는 숫자가 정수 K를 포함해서 K+1개인지 K개인지 알 수 있으면 좋겠습니다. (예제 입력 가지고 눈치껏 하면 되긴 하지만요)
user 4년 전
↔️ On each of the next K lines, there will either be one integer between 1 and 100 (inclusive), or the integer 0.
↔️ You can assume that the output will be an integer in the range 0 and 1 000 000 (inclusive).
그리고, 문제가 되지 않을 수야 있겠지만:
↔️ The first line of input contains the integer K (1 ≤ K ≤ 100 000) which is the number of integers (including “zero”) your boss will say.
입력되는 숫자가 정수 K를 포함해서 K+1개인지 K개인지 알 수 있으면 좋겠습니다. (예제 입력 가지고 눈치껏 하면 되긴 하지만요)