当前位置:网站首页>[summer daily question] Luogu p4413 [coci2006-2007 2] R2
[summer daily question] Luogu p4413 [coci2006-2007 2] R2
2022-07-29 07:28:00 【AC_ Dragon】
Topic link :P4413 [COCI2006-2007#2] R2 - Luogu | New ecology of computer science education (luogu.com.cn)
Topic translation
set up S=(R1+R2)/2, Given R1 And S (-1000<=R1,S<=1000), seek R2.
thank @Xeonacid Translation provided
Title Description
The number S is called the mean of two numbers R1 and R2 if S is equal to (R1+R2)/2. Mirko's birthday present for Slavko was two integers R1 and R2. Slavko promptly calculated their mean which also happened to be an integer but then lost R2! Help Slavko restore R2.
Input format
The first and only line of input contains two integers R1 and S, both between -1000 and 1000.
Output format
Output R2 on a single line.
Examples #1
The sample input #1
11 15Sample output #1
19Examples #2
The sample input #2
4 3Sample output #2
2AC code:
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int r1,s;
cin>>r1>>s;
cout<<2*s-r1;
return 0;
}边栏推荐
- Female graduate students do "mind mapping" and quarrel with their boyfriend! Netizen: the "king of infighting" in the quarrel
- @RequestMapping 用法详解
- Clock tree synthesis (I)
- Spingboot integrates the quartz framework to realize dynamic scheduled tasks (support real-time addition, deletion, modification and query tasks)
- 我想问一下,我flink作业是以upsert-kafka的方式写入数据的,但是我在mysql里面去更
- halcon的安装以及在vs2017中测试,vs2017中dll的配置
- Logback log level introduction
- Introduction to log4j layout
- zip gzip tar压缩进阶版
- Life cycle hooks in routing - activated and deactivated
猜你喜欢

QT topic: basic components (button class, layout class, output class, input class, container class)

Variables and encryption in ansible

0 9 布隆过滤器(Bloom Filter)

电子元器件贸易企业如何借助ERP系统,解决仓库管理难题?

JS chicken laying eggs and egg laying chickens. Who appeared earlier, object or function? Is function an instance of function?

Use of gcc/g++

我,28岁,测试员,10月无情被辞:想给还在学测试 的人提个醒......

【OpenGL】着色器(Shader)的使用

Thinkphp6 realizes database backup

QT basic day 2 (2) QT basic components: button class, layout class, output class, input class, container and other individual examples
随机推荐
Summer summary (II)
【暑期每日一题】洛谷 P7760 [COCI2016-2017#5] Tuna
7-2 计算正五边形的面积和周长 (25分)
分析25个主要DeFi协议的路线图 预见DeFi未来的七大趋势
0 9 布隆过滤器(Bloom Filter)
Prometheus与Grafana
【OpenGL】着色器(Shader)的使用
QT连接两个qslite数据库报错QSqlQuery::exec: database not open
对Vintage分析的一些学习理解
关于大龄读博的几点回答?
thinkphp6 实现数据库备份
状态机dp三维
[summer daily question] Luogu p6461 [coci2006-2007 5] trik
Introduction and introduction of logback
Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
How does MySQL convert rows to columns?
Leetcode buckle classic problem -- 4. Find the median of two positively ordered arrays
[100 cases of unity practice] the single choice multiple choice judgment questions of unity universal question answering system are all common
logback 中FileAppender具有什么功能呢?
【Unity实战100例】Unity万能答题系统之单选多选判断题全部通用