当前位置:网站首页>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;
}边栏推荐
- Personal blog system graduation project opening report
- Unable to enter the system normally, press F8 to select other items to try to enter
- 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
- 高性能算力中心 — InfiniBand — Overview
- 2021-04-16 method overload parameter transfer
- Three implementation methods of distributed lock
- beanstalk 常用方法、说明
- SQL writing problem to calculate the ring ratio of the current month and the previous month
- 2021-05-12内部类
- 2021-04-15
猜你喜欢

Liujinhai, architect of zhongang Mining: lithium battery opens up a Xintiandi for fluorine chemical industry

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

File IO (1)

SQL教程之SQL 中数据透视表的不同方法

Unity技术手册 - 生命周期内速度限制(Limit Velocity Over Lifetime)子模块和速度继承(Inherit Velocity)子模块

安装typescript环境并开启VSCode自动监视编译ts文件为js文件

2021-05-07构造器

Lying trough, the most amazing paper artifact!

Go 单元测试

SQL writing problem to calculate the ring ratio of the current month and the previous month
随机推荐
太无奈!微软停售 AI 情绪识别等技术,直言:“法律跟不上 AI 的发展”
JVM简单入门-02
Comic | code review is driving me crazy!
Different methods of PivotTable in SQL tutorial
高性能算力中心 — NVMe/NVMe-oF — NVMe-oF Overview
2021-05-12接口的定义与实现
JS教程之 什么是 JSX?为什么我们需要它?
MySQL-01.工作中数据库优化和explain字段知识的总结
135137138445 unable to remotely connect to the database due to disabling
2021-04-12 the first implementation of linked list!!!
JVM简单入门-01
Gorm 高级查询
马斯克 18 岁儿子请愿改名,欲断绝父子关系
regular expression
漫画 | Code Review快把我逼疯了!
NiO example
Multithreaded exercises
Successful experience in postgraduate entrance examination for MTI master of English translation major of Beijing University of science and technology in 2023
【第23天】给定一个长度为 n 的数组,将元素 X 插入数组指定的位置 | 数组插入操作4
利用华为云ECS服务器搭建安防视频监控平台