原文链接:传送

 #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的更多相关文章

  1. Codeforces Round #567 (Div. 2)A

    A. Chunga-Changa 题目链接:http://codeforces.com/contest/1181/problem/A 题目 Soon after the Chunga-Changa i ...

  2. Codeforces Round #567 (Div. 2) E2 A Story of One Country (Hard)

    https://codeforces.com/contest/1181/problem/E2 想到了划分的方法跟题解一样,但是没理清楚复杂度,很难受. 看了题解觉得很有道理,还是自己太菜了. 然后直接 ...

  3. 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 ...

  4. Codeforces Round #567 Div. 2

    A:签到. #include<bits/stdc++.h> using namespace std; #define ll long long #define inf 1000000010 ...

  5. Codeforces Round #567 (Div. 2)自闭记

    嘿嘿嘿,第一篇文章,感觉代码可以缩起来简直不要太爽 打个div2发挥都这么差... 平均一题fail一次,还调不出错,自闭了 又一次跳A开B,又一次B傻逼错误调不出来 罚时上天,E还傻逼了..本来这场 ...

  6. 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 ...

  7. 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 ...

  8. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  9. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

随机推荐

  1. [AFO]离开,未尝不是一个新的开始

    2019年5月18日 我注册了洛谷,提交了我的第一份AC代码-- A+B Problem 11月16日-17日 在短短6个月的仓促学习后,我从OI零基础走到了CSP-S的考场上 同年11月26日 在与 ...

  2. UTF自动化测试工具

    自UFT推出后,QTP慢慢退出历史舞台 UFT测试的基本流程:录制测试脚本—-编辑测试脚本—-调试测试脚本—-运行测试脚本—-分析测试结果 UFT(QTP)介绍   http://blog.csdn. ...

  3. Progressbar 实例

    Progressbar 实例原创侠之大者为国为民 最后发布于2015-10-28 15:22:34 阅读数 5394 收藏展开Progressbar - orient 配置进度条的方向:"h ...

  4. 连接数据库报错:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc ...

  5. Python之路Day11

    函数名的第一类对象及使用 当作值,赋值给变量 def func(): print(1) print(func) #查看函数的内存地址 a=func print(a) a() 可以当作容器中的元素 de ...

  6. 逆战:微信小程序(一)

    简介 小程序是一种不需要下载安装即可使用的应用,它实现了应用"触手可及"的梦想,用户扫一扫或者搜一下即可打开应用.也体现了"用完即走"的理念,用户不用关心是否安 ...

  7. Ehcache缓存框架与 Shiro 框架 出现出现验证错误 && Tomcat 缓存清除的问题

    当一个项目使用久了以后就会出现各种问题,下面是我遇到的一个权限验证错误的问题 我的项目是   Ehcache 结合 Shiro  一起使用的,项目用用久了出现   Token验证错误,Cookie之类 ...

  8. java高精度,大数

    package 高精度幂; import java.math.BigDecimal; import java.util.Scanner; public class Main{ public stati ...

  9. AcWing 894. 拆分-Nim游戏

    #include <cstring> #include <iostream> #include <algorithm> #include <unordered ...

  10. Linux 基本命令简单学习

    平常工作中需要使用到的一些Linux基本命令,简单记录: 通过订单号查看日志:   cat /---/---/xxxx20190908.log | grep C52918588112261 -C 5 ...