Educational Codeforces Round 13 A
Description
Johny likes numbers n and k very much. Now Johny wants to find the smallest integer x greater than n, so it is divisible by the number k.
The only line contains two integers n and k (1 ≤ n, k ≤ 109).
Print the smallest integer x > n, so it is divisible by the number k.
5 3
6
25 13
26
26 13
39
嗯,这个就没必要说了吧,找n与k的关系
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
int a,b,c;
long long n,t;
int main()
{
long long k;
long long sum;
cin>>n>>k;
cout<<(n/k+)*k<<endl;
return ;
}
Educational Codeforces Round 13 A的更多相关文章
- Educational Codeforces Round 13 D:Iterated Linear Function(数论)
http://codeforces.com/contest/678/problem/D D. Iterated Linear Function Consider a linear function f ...
- Educational Codeforces Round 13 D. Iterated Linear Function (矩阵快速幂)
题目链接:http://codeforces.com/problemset/problem/678/D 简单的矩阵快速幂模版题 矩阵是这样的: #include <bits/stdc++.h&g ...
- Educational Codeforces Round 13 E. Another Sith Tournament 状压dp
E. Another Sith Tournament 题目连接: http://www.codeforces.com/contest/678/problem/E Description The rul ...
- Educational Codeforces Round 13 D. Iterated Linear Function 水题
D. Iterated Linear Function 题目连接: http://www.codeforces.com/contest/678/problem/D Description Consid ...
- Educational Codeforces Round 13 C. Joty and Chocolate 水题
C. Joty and Chocolate 题目连接: http://www.codeforces.com/contest/678/problem/C Description Little Joty ...
- Educational Codeforces Round 13 B. The Same Calendar 水题
B. The Same Calendar 题目连接: http://www.codeforces.com/contest/678/problem/B Description The girl Tayl ...
- Educational Codeforces Round 13 A. Johny Likes Numbers 水题
A. Johny Likes Numbers 题目连接: http://www.codeforces.com/contest/678/problem/A Description Johny likes ...
- Educational Codeforces Round 13 A、B、C、D
A. Johny Likes Numbers time limit per test 0.5 seconds memory limit per test 256 megabytes input sta ...
- Educational Codeforces Round 13
http://codeforces.com/contest/678 A:水题 #include<bits/stdc++.h> #define fi first #define se sec ...
随机推荐
- springmvc 中异常处理
springmvc 中异常处理常见三种处理方式: 1:SimpleMappingExceptionResolver处理的是处理器方法里面出现的异常 2 3.自定义异常处理器:处理的是处理器方法里面出现 ...
- jQuery-图片的放大镜显示效果(需要大小图)
1.default.aspx <%@ Page Language=.2em; height:.1em; text-align:center; font-size:128px;} .zxx_ ...
- 使用ffmpeg转换视频格式
命令: ffmpeg -i infile -ab 128 -acodec libmp3lame -ac 1 -ar 22050 -r 29.97 -qscale 6 -y outfile 说明: ...
- C++面向对象类的实例题目二
题目描述: 编写一个程序,设计一个产品类Product,其定义如下: class Product { public: Product(char *n,int p,int q); //构造函数 ~Pro ...
- Ubuntu14.04文件目录说明
一.Dev设备目录 二.etc配置文件目录 三.bin默认程序安装目录 四.boot系统启动用到的配置文件以及内核镜像 五.home用户目录 六.lib库文件目录 七.media系统自动挂载设备会选择 ...
- WarTransportation TopCoder - 8404
传送门 分析 我们高兴的发现数据范围特别小,所以我们可以随便搞.因为一共只砍掉一条路,所以我们先算出对于任意一个点如果将它的出边割掉一条则它到达终点的最坏情况的最短距离是多少,然后我们从终点向起点反着 ...
- Java Swing 创建转圈的进度提示框
Java Swing 创建转圈的进度提示框 摘自 https://blog.csdn.net/nihaoqiulinhe/article/details/52439486 置顶2016年09月05日 ...
- 使用docker的kms服务器激活office2016专业增强版
我安装了office2016专业增强版,使用自己搭建的kms激活服务器无法激活,回来使用了一下脚本: 感谢,rainfarm的博主.博客地址:http://blog.sina.com.cn/s/blo ...
- 删除表中重复id值
DELETE t FROM (SELECT *,ROW_NUMBER()OVER(PARTITION BY test1,test2,test3,test4 ORDER BY RAND()) AS RN ...
- JavaScript CheckBox实现全选和部分选择
<html> <head> <script> function BatchAddToBasket() { var questionNums = ''; var ch ...