From e2cd3100cdd01af6c778a2a50f6f637cb18bda1d Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Wed, 8 May 2024 20:19:44 +0900 Subject: [PATCH] add: boj/28324.py --- boj/28324.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 boj/28324.py diff --git a/boj/28324.py b/boj/28324.py new file mode 100644 index 0000000..3c22dfa --- /dev/null +++ b/boj/28324.py @@ -0,0 +1,14 @@ +import sys +input=sys.stdin.readline +n=int(input().rstrip()) +arr=list(map(int,input().rstrip().split())) + +last=0 +result=0 +for i in range(1,n+1): + if arr[-i]>last: + last+=1 + elif arr[-i]