当前位置:网站首页>NOI OJ 1.4 05:整数大小比较 C语言
NOI OJ 1.4 05:整数大小比较 C语言
2022-06-23 10:12:00 【chd44】
描述
输入两个整数,比较它们的大小。
输入
一行,包含两个整数x和y,中间用单个空格隔开。
0 <= x < 2^32, -2^31 <= y < 2^31。
输出
一个字符。
若x > y,输出 > ;
若x = y,输出 = ;
若x < y,输出 < ;
三种情况都列出来,这里用了 long long是因为范围过大,超出了int的范围。
注意蓝色处x和y的范围
#include<stdio.h>
int main(){
int long long a,b;
scanf("%lld %lld",&a,&b);
if (a==b)
printf("=");
else if (a>b)
printf(">");
else
printf("<");
return 0;
}边栏推荐
- 有没有人,计划开源一套工业级“秒杀”系统架构?
- How does thymeleaf get the value of the request parameter in the URL?
- 解决预览pdf不能下载的问题
- thymeleaf如何取url中请求参数值?
- Too helpless! Microsoft stopped selling AI emotion recognition and other technologies, saying frankly: "the law can not keep up with the development of AI"
- 基于STM32设计的宠物投喂器
- 数值计算方法
- mysql innodb 的 redo log buffer 中未 commit 的事务持久化到 redo log 后,万一事务 rollback 了怎么办?redo log 怎么处理这个事务操作?
- [day 23] given an array of length N, insert element x into the position specified by the array | array insertion operation 4
- High performance computing center RDMA implementation technology
猜你喜欢

Dr. Sun Jian was commemorated at the CVPR conference. The best student thesis was awarded to Tongji Ali. Lifeifei won the huangxutao Memorial Award

STM32F1与STM32CubeIDE编程实例-红外寻迹传感器驱动

XML related interview questions

Copilot免费时代结束!正式版67元/月,学生党和热门开源项目维护者可白嫖

AI system frontier dynamics issue 38: Google has abandoned tensorflow?; Four GPU parallel strategies for training large models; Father of llvm: modular design determines AI future

Comic | code review is driving me crazy!

陆奇首次出手投资量子计算

Nuxt. Differences between JS spa and SSR

【软件与系统安全】堆溢出

I have been promoted. How can I get along with my former colleagues at the same level?
随机推荐
How does thymeleaf get the value of the request parameter in the URL?
太无奈!微软停售 AI 情绪识别等技术,直言:“法律跟不上 AI 的发展”
What is JSX in the JS tutorial? Why do we need it?
Confessing with Snake games (with source code)
135137138445 unable to remotely connect to the database due to disabling
利用华为云ECS服务器搭建安防视频监控平台
beanstalk 常用方法、说明
J. Med. Chem. | Release: a new drug design model for deep learning based on target structure
MySQL-02.工作中对索引的理解
RPC kernel details you must know (worth collecting)!!!
在OpenCloudOS使用snap安装.NET 6
IPv6 的速度比 IPv4 更快?
必须知道的RPC内核细节(值得收藏)!!!
Year end answer sheet! Tencent cloud intelligent comprehensive strength ranks first in China!
AI芯片技术-2022年
MySQL基础-笔记
mysql innodb 的 redo log buffer 中未 commit 的事务持久化到 redo log 后,万一事务 rollback 了怎么办?redo log 怎么处理这个事务操作?
Different methods of PivotTable in SQL tutorial
Liujinhai, architect of zhongang Mining: lithium battery opens up a Xintiandi for fluorine chemical industry
pycharm安装教程,超详细