Ispit
Luke does not like studying, but he really wants to pass the extremely hard exam from the first year.Somebody has told him that all the students from the second year know the answers from the exam, but that is far from real truth. In fact, no one from the second year knows the answers but they all think that somebody else knows.Luke chooses some student A and asks him about the answers. Student A says that he/she doesn't know, but that he/she thinks that student B knows the answers. After that, Luke is asking student B, and so on...When he finally realizes that this method will give him no useful results, he is very sad, but then he realizes that he can meet many older students this way, which could be useful some day.Write a program to find the student which Luke must ask first, so that the total number of students Luke meets in the process is as high as possible.
3
3
3
1Output
24
2
3
4
1Output
16
2
3
4
3
1
1Output
5Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.