主页 讨论版 问题 名次 状态 统计

[提交][状态][讨论版]

## 题目描述

God Huang is good at study, and he is very likely to get better grades than his poor roomate cyt. In a singe test, God Huang has equal probability to get grades betweeen 1 and A, while poor cyt has equal probability to get grades between 1 and B. God Huang will get some pleasure points if he's score is a multiple of cyt's, and the pleasure points he will get is the square of cyt's points. For example if God Huang got 100 grades and cyt got 50 than he will get pleasure points of 50 × 50. Your task now is to calculate the expect pleasure points God Huang will get.

## 输入

The input contains multiple test cases(About 10000 test cases). Each case contains two integers A and B (1 <= B < = A <= 1 000 000) in a line.
The input is terminated by n = m = 0.

## 输出

For each test case, output the expect pleasure point God Huang will get as a reduced fraction (i.e., the greatest common divisor of the numerator and denominator is 1). If the answer is zero (one), you should output 0/1 (1/1) instead)

1 1
2 2
8 4
0 0

1/1
3/2
37/16

## 提示

Notice that if cyt and God Huang get same score, God Huang will still get pleasure points.

[提交][状态][讨论版]