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”三种中任意一种就输 ...
随机推荐
- 微信小程序报错TypeError: this.setData is not a function
今天在练习小程序的时候,遇到小程序报错 对于处于小白阶段的我,遇到这种报错,真还不知道是错从何来,只有一脸蒙逼,后来通过查询,终于知道了问题所在,下面对这一问题做一记录 小程序默认中是这么写的 onL ...
- 小白的java学习之路 “ 带参数的方法”
一.带参数的方法: 1.1 语法: <访问修饰符> 返回类型 <方法名>(<形式参数列表>) { //方法的主体 } 1.2 案例: 榨汁机 public clas ...
- linux基础安全
一.用户防护 Chage -l 用户名 查看用户账号有效期信息 Chage -E 时间 用户名 给用户设置过期时间 /etc/login.defs 文件保存许多默认设置 Pas ...
- 初识压缩感知Compressive Sensing
压缩感知是近年来极为热门的研究前沿,在若干应用领域中都引起瞩目.最近粗浅地看了这方面一些研究,对于Compressive Sensing有了初步理解,在此分享一些资料与精华.本文针对陶哲轩和Emman ...
- 软件架构期末复习(Struts2+Spring+Hibernate)
Struts2+Spring+Hibernate The Model-ViewController pattern in Struts2 is implemented with the followi ...
- 牛客网——剑指offer(跳台阶以及变态跳台阶_java实现)
首先说一个剪枝的概念: 剪枝出现在递归和类递归程序里,因为递归操作用图来表示就是一棵树,树有很多分叉,如果不作处理,就有很多重复分叉,会降低效率,如果能把这些分叉先行记录下来,就可以大大提升效率——这 ...
- HTML div标签
看成一个 纯净的箱子吧.....啥属性都没有....默认宽度100% 高度0高度是 按DIV里的 内容而变高也可以在 CSS里 设置 宽高....DIV就是 典型的 标签.. P UL LI 等 标签 ...
- EasyExcel实现导入excel
https://blog.csdn.net/rexueqingchun/article/details/91870372 1.pom.xml配置依赖包 <!-- xls格式excel依赖包 -- ...
- cookies、sessionStorage和localStorage的异同点
相同点:都是存储于客户端 不同点: 1.存储大小 cookies数据大小不能大于4k; localStorage和sessionStroage则可以达到5M: 2.有效时间 cookies在设置的有效 ...
- C++-指针阅读能力提升
下面的标识符你肯定在工程中看不到,但是在面试题中却非常常见,掌握掌握还是不错的. int (*p1)(int*, int (*f)(int*)); int (*p2[5])( ...