← Back to List

14656번: 조교는 새디스트야!! ↗

Solutions

C++14
187 B | 187 chars
#include <stdio.h>
int ar[20005],n,Cnt;
int main()
{
	scanf("%d",&n);
	for(int x=0; x<n; x++) scanf("%d",&ar[x]);
	for(int x=0; x<n; x++)
	{
		if(x+1!=ar[x])Cnt++;
	}
	printf("%d",Cnt);
}