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”三种中任意一种就输 ...
随机推荐
- 常用命令 在linux下
1.拷贝某个目录及其下的所有的文件到另外一个目录 语法:cp -r <source directory name>/ <destination directory name>/ ...
- spring整合websocket,如何在服务端依赖注入service
1.在pom.xml文件中添加jar包: <properties> <spring.version>4.0.5.RELEASE</spring.version> & ...
- vue加载单文件使用vue-loader报错
报错信息如下:ERROR in ./src/login.vue Module Error (from ./node_modules/vue-loader/lib/index.js): vue-load ...
- 简单理解Linux系统的挂载是什么鬼
转载自http://c.biancheng.net/view/2859.html Linux系统中“一切皆文件”,所有文件都放置在以根目录为树根的树形目录结构中.在 Linux 看来,任何硬件设备也都 ...
- MySQL安装版安装过程
步骤1 步骤2 步骤3 步骤4 步骤5 步骤6 步骤7 步骤8 步骤9 步骤10 步骤11 步骤12
- StackExchange.Redis 之 SortedSet 类型示例
1,增加操作 RedisCacheHelper.Instance.ZSortadd(); RedisCacheHelper.Instance.ZSortadd(); RedisCacheHelper. ...
- Java自学-Lambda 概念
Java Lambda 表达式概念 假设一个情景: 找出满足条件的Hero 从使用普通方法,匿名类,以及Lambda这几种方式,逐渐的引入Lambda的概念 步骤 1 : 普通方法 使用一个普通方法, ...
- IIS学习笔记
IIS传输笔记 1.作用 IIS 将网站开发代码传输到服务器上,就是为了网站的发布 2.下载安装 我是使用的云服务器,windows sever 2012 2.1打开"服务器管理器" ...
- ASP.NET Process Model之二:ASP.NET Http Runtime Pipeline - Part II
https://www.cnblogs.com/artech/archive/2007/09/13/891266.html 二.ASP.NET Runtime Pipeline(续ASP.NET Ht ...
- 如何把U盘的两个盘或者多个盘合成一个
1.插入U盘,导出所有重要数据. 2.右击我的电脑,点管理打开设备管理器. 3.在设备管理器里找到磁盘管理. 4.在磁盘管理右侧出现下图: 5.如图是windows 7的界面. 6.找到U盘,图上是磁 ...