I-th (4) P74859


Statement
 

pdf   zip

thehtml

Write a program that, given several test cases, each one composed by an integer number i and a sequence of natural numbers x1, x2, …, xn, prints each xi.

Input

Input has several cases. Each case begins with an integer number i, followed by a sequence x1, …, xn ended with −1.

Output

For each case, if the position i is correct, print the content of i as it is shown in the examples. Otherwise, print “Incorrect position.”.

Public test cases
  • Input

    5
    1 3 5 7 9 0 2 4 6 8 -1
    7
    16 8 4 2 -1
    

    Output

    At the position 5 there is a(n) 9.
    Incorrect position.
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    C C++ Java Python