Codeforces Round #567 (Div. 2) A.Chunga-Changa
原文链接:传送
#include"algorithm"
#include"iostream"
#include"cmath"
using namespace std;
long long x,y,z,ans;
int main(){
while(cin>>x>>y>>z){
ans=;
long long s=,i=,j=;
s=(x+y)/z;
cout<<s<<" ";
i=x%z;
j=y%z;
if((i+j)>=z){
if(i>j) cout<<z-i<<endl;
else cout<<z-j<<endl;
}
else {
cout<<<<endl;
} }
return ; }
Codeforces Round #567 (Div. 2) A.Chunga-Changa的更多相关文章
- Codeforces Round #567 (Div. 2)A
A. Chunga-Changa 题目链接:http://codeforces.com/contest/1181/problem/A 题目 Soon after the Chunga-Changa i ...
- Codeforces Round #567 (Div. 2) E2 A Story of One Country (Hard)
https://codeforces.com/contest/1181/problem/E2 想到了划分的方法跟题解一样,但是没理清楚复杂度,很难受. 看了题解觉得很有道理,还是自己太菜了. 然后直接 ...
- Codeforces Round #567 (Div. 2)B. Split a Number (字符串,贪心)
B. Split a Number time limit per test2 seconds memory limit per test512 megabytes inputstandard inpu ...
- Codeforces Round #567 Div. 2
A:签到. #include<bits/stdc++.h> using namespace std; #define ll long long #define inf 1000000010 ...
- Codeforces Round #567 (Div. 2)自闭记
嘿嘿嘿,第一篇文章,感觉代码可以缩起来简直不要太爽 打个div2发挥都这么差... 平均一题fail一次,还调不出错,自闭了 又一次跳A开B,又一次B傻逼错误调不出来 罚时上天,E还傻逼了..本来这场 ...
- Codeforces Round #567 (Div. 2) B. Split a Number
Split a Number time limit per test 2 seconds memory limit per test 512 megabytes input standard inpu ...
- Codeforces Round #366 (Div. 2) ABC
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...
- Codeforces Round #354 (Div. 2) ABCD
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/out ...
- Codeforces Round #368 (Div. 2)
直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...
随机推荐
- C语言实现顺序栈
C语言实现顺序栈,顺便加深刻++i,++i的区别 #include <stdio.h>#include <stdlib.h>#define maxsize 100/*写在前面的 ...
- GYCTF 盲注【regexp注入+时间盲注】
考点:regexp注入+时间盲注 源码: <?php # flag在fl4g里 include 'waf.php'; header("Content-type: text/html; ...
- 2019.2.21 T2题解
meet 大概思路就是 , 找出相交的路径 , 判断方向 , 分类讨论.. 假设已经找出了相交路径 ... 若方向相同 , 则找到相交路径上边权的最大值 , 若最大值>出发时间差 , 则可行. ...
- 【Unity|C#】基础篇(14)——预处理指令(#)
[学习资料] <C#图解教程>(第23章):https://www.cnblogs.com/moonache/p/7687551.html 电子书下载:https://pan.baidu. ...
- 4P遇上了5P
(1)4P工作要素:任何一位从业者,都应该好好想想自己工作的初衷是什么?你将自己所从事的工作又是定位在什么位置?而这份工作的视角又有多宽.多广?最后是你会在某个周期内完成工作或者是实现突破. (2)5 ...
- fastadmin中curd生成的表单将数字展示为文字
1.在require-table.js文件中找到formatter 在status中将下列参数自行替换为你的表达方式 var custom = {2: 'success', 3: 'danger', ...
- Wannafly Camp 2020 Day 6N. 合并!
#include <bits/stdc++.h> using namespace std; int n,a[2005]; int main() { long long ans=0; cin ...
- Unable to create initial connections of pool. spring boot mysql
Unable to create initial connections of pool. 在链接url里添加 将useSSL=true改为useSSL=false 只能说明服务器没有打开SSL功能
- ORA-12638: 身份证明检索失败
PLSQL 连接Oracle时提示 “ORA-12638: 身份证明检索失败” 错误, 但是开发IDE可以正常连接,DataGrid 可以正常连接,所以确定是本地设置问题. 网上搜了一下,说是因为Or ...
- js替换从excel复制的文本的换行
var newStr=oldStr.replace(/\n/g,','); 该代码即可将文本中的换行替换为, oldStr为从excel复制过来的值 newStr为替换后的值