I-th (2) P27411


Statement
 

pdf   zip

thehtml

Write a program that, given an integer number i and a sequence of natural numbers x1, …, xn, prints xi.

Input

Input begins with an integer number i, followed by the sequence x1, …, xn ended with −1.

Output

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
    

    Output

    At the position 5 there is a(n) 9.
    
  • Input

    7
    16 8 4 2 -1
    

    Output

    Incorrect position.
    
  • Input

    -4
    1 2 3 4 -1
    

    Output

    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