Submit solution

Points:
7

Time limit:
2.0s

Memory limit:
256M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Counting is very difficult so Veshy asks you for help. You are given two positive integers, and . You want to find the highest power of , , that will divide into . In other words you want to find the maximum such that divides into .

#### Input Specification

The input is a single line containing two space-separated integers, and in that order.

#### Output Specification

Output on a single line, the number such that divides into and is the greatest possible.

#### Sample Input 1

`8 849`

#### Sample Output 1

`281`

#### Sample Input 2

`2 2020`

#### Sample Output 2

`2013`

#### Explanation

In sample input 1, is the highest power of that can divide into

In sample input 2, is the highest power of that can divide into

## Comments

for the sample input 1 shouldn't the output be 440

No -> https://tio.run/##K6gsycjPM/7/[email protected]1FRQBtEKlanFROgwMTEA6wDSCnn5//8DAA

No, the output for sample 1 is correct.

my bad I typed in the input wrong