Under construction

Still being built. Things may change

Vanished Without a Trace

Time limit1sMemory limit1024 MB

Summary
Given arrays A and B of N integers each (N up to 9), print the smaller of X and Y, or the shared value if they are equal. The statement never defines X or Y.
Level

Easy2 of 10

Topics
Implementation
Solved
No attempts yet

문제

How should '온데간데없을뿐더러' be spaced? The adjective '온데간데없다' and the ending '-을뿐더러' combine, so it is written without a space as '온데간데없을뿐더러'.

입력

The first line contains NN, the number of elements in each array.

The second line contains the elements of array AA, A1,A2,⋯ ,ANA_1, A_2, \cdots, A_N, separated by spaces.

The third line contains the elements of array BB, B1,B2,⋯ ,BNB_1, B_2, \cdots, B_N, separated by spaces.

출력

Print the smaller of XX and YY. If XX and YY are equal, print that value.

제한

  • 1≤N≤91\le N\le 9
  • 1≤Ai≤99(1≤i≤N)1\le A_i\le 99 (1\le i\le N)
  • 1≤Bj≤99(1≤j≤N)1\le B_j\le 99 (1\le j\le N)
  • Every number in the input is an integer.

힌트

XX and YY can be greater than 231−12^{31}-1, so store them as long long in C/C++ or as long in Java.

Examples2

  1. Example 1

    Input
    5
    5 4 3 2 1
    1 2 34 5 6
    
    Expected output
    54321
    
  2. Example 2

    Input
    9
    99 99 99 99 99 99 99 99 99
    99 99 99 99 99 99 99 99 99
    
    Expected output
    999999999999999999