当前位置:网站首页>[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;
}边栏推荐
- 【暑期每日一题】洛谷 P4414 [COCI2006-2007#2] ABC
- WPF nested layout case
- Job 7.28 file IO and standard IO
- WPF interface layout must know basis
- Thinkphp6 realizes database backup
- 【暑期每日一题】洛谷 P1601 A+B Problem(高精)
- JS day 4 process control (if statement and switch statement)
- A long article --- in-depth understanding of synchronized
- What is the function of fileappender in logback?
- Scala higher order (10): exception handling in Scala
猜你喜欢

I, 28, a tester, was ruthlessly dismissed in October: I want to remind people who are still learning to test

How does MySQL convert rows to columns?
![【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK](/img/bf/c0e03f1bf477730f0b3661b3256d1d.png)
【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK

【MYSQL】-【子查询】

2-unified return class dto object

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

亚马逊云助手小程序来啦!

Docker's latest super detailed tutorial - docker creates, runs, and mounts MySQL

thinkphp6 实现数据库备份

Use of gcc/g++
随机推荐
【暑期每日一题】洛谷 P1601 A+B Problem(高精)
How to use GS_ Expansion expansion node
时钟树综合(一)
halcon的安装以及在vs2017中测试,vs2017中dll的配置
Operator3 - design an operator
Ethernet interface introduction
Practice of online problem feedback module (XVII): realize the online download function of excel template
蓝桥杯A组选数异或
JS break and continue and return keywords
BeanUtils.setProperty()
新生代公链再攻「不可能三角」
logback 中FileAppender具有什么功能呢?
关于大龄读博的几点回答?
【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK
It's enough for MySQL to have this article (disgusting and crazy typing 37k words, just for Bo Jun's praise!!!)
【暑期每日一题】洛谷 P4414 [COCI2006-2007#2] ABC
[MySQL] - [subquery]
在线问题反馈模块实战(十七):实现excel模板在线下载功能
logback简介及引入方法
Latest 10 billion quantitative private placement list