题目链接:https://vjudge.net/contest/210334#problem/C 题目大意: It is easy to see that for every fraction in the form 1 k (k > 0), we can always find two positive integers x and y, x ≥ y, such that: 1 k = 1 x + 1 y Now our question is: can you write a program…
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses. For example, Given numerator = 1, denominator = 2, retu…
我写了一个gcd TL该.然后调用math内gcd,AC该... 思维:它是采取n前面的最小公倍数和n求 1~n的最小公倍数 代码: import java.util.Scanner; import java.math.*; public class Main{ public static void main(String[] args){ Scanner cin = new Scanner(System.in); BigInteger[] s = new BigInteger[102]; s[…