当前位置:网站首页>【暑期每日一题】洛谷 P7222 [RC-04] 信息学竞赛
【暑期每日一题】洛谷 P7222 [RC-04] 信息学竞赛
2022-07-01 04:47:00 【AC_Dragon】
题目链接:P7222 [RC-04] 信息学竞赛 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)
题目描述
小 R 今天学习了余角有关的数学知识,请你帮帮他计算一个角的余角吧!
一个角的余角的计算公式如下:
∠B=90°-∠A
其中 A 是给出的角,B 是你要计算的角。
输入格式
一行一个整数 x,表示 ∠A=x°。
输出格式
一行一个整数 y,表示 ∠B=y°。你需要严格按照公式计算。
样例 #1
样例输入 #1
100
样例输出 #1
-10
提示
对于 100% 的数据,x 在 C++ 语言的 int 范围内。即 x∈[-2^31,2^31-1]。
AC code:(这题主要考察不要忘了开long long...)
#include<iostream>
using namespace std;
int main()
{
long long x; // 一定要开long long,否则int边界进行运算可能会爆int!!!
cin>>x;
cout<<90-x<<endl;
return 0;
}
边栏推荐
- Shell之Unix运维常用命令
- Take a cold bath
- Summary of acl2021 information extraction related papers
- Leecode question brushing record 1310 subarray XOR query
- Common methods in transforms
- [FTP] the solution to "227 entering passive mode" during FTP connection
- 2022 hoisting machinery command registration examination and hoisting machinery command examination registration
- Collect the annual summary of laws, regulations, policies and plans related to trusted computing of large market points (national, ministerial, provincial and municipal)
- Cmake selecting compilers and setting compiler options
- Thoughts on the construction of Meizhou cell room
猜你喜欢
STM32扩展版 按键扫描
先有网络模型的使用及修改
2022 tea master (intermediate) examination question bank and tea master (intermediate) examination questions and analysis
2022 Shanghai safety officer C certificate examination question simulation examination question bank and answers
数据加载及预处理
Shell之一键自动部署Redis任意版本
[hard ten treasures] - 1 [basic knowledge] classification of power supply
Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com. and
C - detailed explanation of operators and summary of use cases
Maixll dock quick start
随机推荐
[difficult] sqlserver2008r2, can you recover only some files when recovering the database?
Question bank and answers for chemical automation control instrument operation certificate examination in 2022
Kodori tree board
数据加载及预处理
RuntimeError: “max_pool2d“ not implemented for ‘Long‘
About the transmission pipeline of stage in spark
分布式事务-解决方案
Software testing needs more and more talents. Why do you still not want to take this path?
神经网络-非线性激活
神经网络-卷积层
Basic usage, principle and details of session
技术分享| 融合调度中的广播功能设计
[hardware ten treasures catalogue] - reprinted from "hardware 100000 whys" (under continuous update ~ ~)
LM小型可编程控制器软件(基于CoDeSys)笔记二十:plc通过驱动器控制步进电机
VR线上展览所具备应用及特色
Quelques outils dont les chiens scientifiques pourraient avoir besoin
Extension fragment
pytorch中常用数据集的使用方法
2022 question bank and answers for safety production management personnel of hazardous chemical production units
pytorch神经网络搭建 模板