CODE FESTIVAL 2016 qual A

Submission #1165621

Source codeソースコード

number = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(number):
    for j in range(number):
        if a[i] ==j+1 and a[j] == i+1:
            count += 1
print(int(count/2)

Submission

Task問題 B - 仲良しうさぎ / Friendly Rabbits
User nameユーザ名 エモキング
Created time投稿日時
Language言語 Python3 (3.4.3)
Status状態 RE
Score得点 0
Source lengthソースコード長 206 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
Sample - 0_00.txt,0_01.txt,0_02.txt
All 0 / 200 0_00.txt,0_01.txt,0_02.txt,1_00.txt,1_01.txt,1_02.txt,1_03.txt,1_04.txt,1_05.txt,1_06.txt,1_07.txt,1_08.txt,1_09.txt,1_10.txt,1_11.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
0_00.txt RE
0_01.txt RE
0_02.txt RE
1_00.txt RE
1_01.txt RE
1_02.txt RE
1_03.txt RE
1_04.txt RE
1_05.txt RE
1_06.txt RE
1_07.txt RE
1_08.txt RE
1_09.txt RE
1_10.txt RE
1_11.txt RE