#C10138. Minimum Widget Sequence

    ID: 39310 Type: Default 1000ms 256MiB

Minimum Widget Sequence

Minimum Widget Sequence

You are given two integers \(n\) and \(k\) where \(n\) represents the number of widgets with serial numbers ranging from 1 to \(n\), and \(k\) represents the maximum capacity of a box in terms of the number of widgets it can hold. Your task is to determine the minimum number of widgets (i.e. the minimum serial number count) that the box should hold in order to satisfy the condition that it does not exceed its maximum capacity.

Mathematically, you need to compute \(\min(n, k)\).

Examples:

  • Input: 10 3, Output: 3
  • Input: 15 4, Output: 4
  • Input: 5 5, Output: 5
  • Input: 20 6, Output: 6
  • Input: 1 1, Output: 1
  • Input: 1000000000 1, Output: 1
  • Input: 1000000000 1000000000, Output: 1000000000

inputFormat

The input consists of a single line containing two space-separated integers \(n\) and \(k\), where \(n\) is the number of widgets and \(k\) is the maximum capacity of the box.

outputFormat

Output a single integer, which is the minimum between \(n\) and \(k\), i.e., \(\min(n, k)\).

## sample
10 3
3