文件名称:yy
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:6.71kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
给出一个非负小数,找出分子不超过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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.