当前位置:网站首页>[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 15
Sample output #1
19
Examples #2
The sample input #2
4 3
Sample output #2
2
AC code:
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int r1,s;
cin>>r1>>s;
cout<<2*s-r1;
return 0;
}
边栏推荐
- 5-整合swagger2
- MySQL 使用客户端以及SELECT 方式查看 BLOB 类型字段内容总结
- 同步/异步、阻塞/非阻塞 与 IO
- CDC source can quit after reading MySQL snapshot split
- 7-2 calculate the area and perimeter of a regular pentagon (25 points)
- 零数科技深度参与信通院隐私计算金融场景标准制定
- BeanUtils.setProperty()
- Docker's latest super detailed tutorial - docker creates, runs, and mounts MySQL
- gin abort不能阻止后续代码的问题
- Summer summary (II)
猜你喜欢
Latest 10 billion quantitative private placement list
Round avatar of user list and follow small blocks
thinkphp6 实现数据库备份
[summer daily question] Luogu p6461 [coci2006-2007 5] trik
Variables and encryption in ansible
Leetcode buckle classic problem -- 4. Find the median of two positively ordered arrays
零数科技深度参与信通院隐私计算金融场景标准制定
QT连接两个qslite数据库报错QSqlQuery::exec: database not open
CMOS芯片制造全工艺流程
QT topic: basic components (button class, layout class, output class, input class, container class)
随机推荐
Introduction to log4j layout
暑期总结(二)
论文阅读 (62):Pointer Networks
do end用法的妙处
What is the function of fileappender in logback?
小D的刺绣
thinkphp6 实现数据库备份
2-统一返回类DTO对象
WPF simple login page completion case
【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK
cdc source能读完MySqlSnapshotSplit 就退出嘛
7-2 calculate the area and perimeter of a regular pentagon (25 points)
2-unified return class dto object
LevelFilter简介说明
梳理市面上的2大NFT定价范式和4种解决方案
我想问一下,我flink作业是以upsert-kafka的方式写入数据的,但是我在mysql里面去更
使用自定义注解校验list的大小
[summer daily question] Luogu p6336 [coci2007-2008 2] bijele
jdbc入门
Vue router route cache