Infinite sum
Easy
Execution time limit is 2 seconds
Runtime memory usage limit is 256 megabytes
This problem presents a concise task: Calculate the sum.
Input
The input consists of a single line containing two integers, a and b, where 1 ≤ a, b ≤ 10.
Output
Output a single line with the word "infinity" if the series diverges. If the series converges to a rational number, provide the sum as an irreducible fraction. If the series converges to an irrational number, output the word "irrational".
Examples
Input #1
Answer #1
Submissions 9
Acceptance rate 33%