BOJ - 14656 - 조교는 새디스트야!!

Updated:

import sys

def solution():
    N = int(sys.stdin.readline())
    arr = list(map(int, sys.stdin.readline().split()))

    ret = 0
    for i in range(1, N+1):
        if arr[i-1] != i:
            ret += 1

    print(ret)

solution()

https://www.acmicpc.net/problem/14656

Categories:

Updated:

Leave a comment