当前位置:网站首页>分数大小的比较
分数大小的比较
2022-06-12 02:55:00 【HENU_Lzey】

#include<iostream>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
long long a,b,x,y,a1,b1;
while(~scanf("%lld %lld %lld %lld",&x,&a,&y,&b)){
if(x/a>y/b){
printf(">\n");
}else if(x/a==y/b){
a1=x%a;
b1=y%b;
if(a1*b>b1*a)printf(">\n");
else if(a1*b==b1*a)printf("=\n");
else if(a1*b<b1*a)printf("<\n");
}else if(x/a<y/b){
printf("<\n");
}
}
return 0;
}
1.数据较大时,用scanf输入;
2.对于分数的比较大小时先划成真分数比较实数部分;再比较分数部分
边栏推荐
- Bochuang smart sprint technology innovation board: annual revenue of RMB 1.1 billion, book value of accounts receivable of RMB 300million
- Force deduction solution summary 433- minimum gene change
- 2022 Fujian Provincial Safety Officer C certificate (full-time safety officer) examination simulation 100 questions and answers
- 微积分复习2
- Audio and video technology under the trend of full true Internet | Q recommendation
- ssh公钥登录失败报错:sign_and_send_pubkey: no mutual signature supported
- Demand and business model innovation - demand 9- prototype
- Comment prévenir les incendies électriques dans les centres commerciaux?
- 【高代码文件格式API】道宁为您提供文件格式API集——Aspose,只需几行代码即可创建转换和操作100多种文件格式
- Force deduction solution summary - Sword finger offer II 114 Alien dictionary
猜你喜欢

maya前臺渲染插件mel脚本工具

Requirements and business model analysis requirements 13 data modeling

Cupp dictionary generation tool (similar tools include crunch)

微信小程序项目实例——体质计算器

Layered architecture of DDD

Demand and business model innovation - demand 8- interview
![[point cloud compression] variable image compression with a scale hyperprior](/img/d4/4084f64d20c8e622cddef2310d3b6c.png)
[point cloud compression] variable image compression with a scale hyperprior

ACL 2022 - strong combination of pre training language model and graphic model

Machine learning - dimensionality reduction (data compression, data visualization)

About 100 to realize the query table? Really? Let's experience the charm of amiya.
随机推荐
alertmanager告警配置
Apache simple honeypot
The program actively carries out telephone short message alarm, and customizes telephone, short message and nail alarm notifications
How to use DAO to build a knowledge database with collective wisdom and sustainable incentive mechanism
$. map(data,function(item,index){return XXX})
Introduction to architecture - who moved my cake
Min25 sieve
How to make div 100% page (not screen) height- How to make a div 100% of page (not screen) height?
Force deduction solution summary 933- number of recent requests
Application of ankery anti shake electric products in a chemical project in Hebei
String number with special style
Demand and business model innovation - demand 9- prototype
Using SSH public key to transfer files
架构入门讲解 - 谁动了我的蛋糕
Force deduction solution summary 1037- effective boomerang
Quelles sont les solutions dans tous les domaines?
[point cloud compression] variable image compression with a scale hyperprior
Android HTML5 page load cache optimization
GeForce GTX 2050/2080/3090/A6000自动安装nvidia显卡驱动
How to prevent electrical fire in shopping malls?