文件名称:yy
介绍说明--下载内容均来自于网络,请自行研究使用
给出一个非负小数,找出分子不超过M,分母不超过N的最简分数或整数,
使其最接近给出的小数。如果这个分数不唯一,输出‘TOO MANY’。
输入文件格式(closest.in)
第一行,M,N(1<=M,N<=10^9)
第二行,即小数R,(0<R
输出文件格式(closest.out)
仅一行,若解唯一输出 分子 / 分母(整数K写成K/1),否则输出TOO MANY
样例输入:
360 120
3.1415926536
样例输出:
355/113-Give a non-negative decimals to identify elements does not exceed M, the denominator does not exceed N most Jane Score or integral to the nearest decimal given. If the scores are not the only, the output TOO MANY. Input file format (closest.in) the first line, M, N (1 <= M, N <= 10 ^ 9) the second line, that is, a small number of R, (0 <R output file format (closest.out) only his party, If the only solution output elements/denominator (integer K written K/1), otherwise the output sample TOO MANY Input: 360 1203.1415 926536 sample output: 355/113
使其最接近给出的小数。如果这个分数不唯一,输出‘TOO MANY’。
输入文件格式(closest.in)
第一行,M,N(1<=M,N<=10^9)
第二行,即小数R,(0<R
输出文件格式(closest.out)
仅一行,若解唯一输出 分子 / 分母(整数K写成K/1),否则输出TOO MANY
样例输入:
360 120
3.1415926536
样例输出:
355/113-Give a non-negative decimals to identify elements does not exceed M, the denominator does not exceed N most Jane Score or integral to the nearest decimal given. If the scores are not the only, the output TOO MANY. Input file format (closest.in) the first line, M, N (1 <= M, N <= 10 ^ 9) the second line, that is, a small number of R, (0 <R output file format (closest.out) only his party, If the only solution output elements/denominator (integer K written K/1), otherwise the output sample TOO MANY Input: 360 1203.1415 926536 sample output: 355/113
(系统自动生成,下载前可以参看下载内容)
下载文件列表
最接近的分数.c
最接近的分数.exe
最接近的分数.txt
最接近的分数.exe
最接近的分数.txt