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 ...
随机推荐
- TextView 点击拨打电话
点击TextView,拨打电话 TextView属性:android:autoLink="phone" 需要配置文件中的属性 <uses-permission android ...
- TaikrSpaceShooterStartKit.unitypackage包下载地址
有好多教程里面没有资源包,现在加密分享给大家 unity4.* 链接: https://pan.baidu.com/s/1XMo2zVpV3ZhkNZKOb6H0yw 密码: tqnt unity5 ...
- 36-图像有用区(dfs, bfs)
http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=92 图像有用区域 时间限制:3000 ms | 内存限制:65535 KB 难度:4 ...
- ROS Learning-013 beginner_Tutorials (编程) 编写ROS服务版的Hello World程序(Python版)
ROS Indigo beginner_Tutorials-12 编写ROS服务版的Hello World程序(Python版) 我使用的虚拟机软件:VMware Workstation 11 使用的 ...
- getline()函数的两种用法
getline()函数的输入流对象可以是标准输入流对象cin,也可以是一个文件输入流对象fin; (1)输入流对象的成员函数(有三个参数,一般除非需要自己选定停止符,并不推荐使用): basic_is ...
- git命令(一)
git中每个版本的保存是记录每个版本的快照,只在乎这个文件是否改变. Workspace:工作区 Index / Stage:暂存区 Repository:仓库区(或本地仓库) Remote:远程仓库 ...
- Java50道经典习题-程序44 偶数的素数和
题目:一个偶数总能表示为两个素数之和.分析:一个偶数可能会有不止一对两个素数之和的情况 例如:20=3+17 20=7+13 import java.util.Scanner; public clas ...
- 从一个xaml文件获取xaml内容,遍历寻找对象
- Web Server 在iis下部署php网站在iis下
Web Server 在iis下部署php网站在iis下 一.参考地址: windows8 http://www.cnblogs.com/haocool/archive/2012/10/14/win ...
- ubuntu17.04安装flash
因为用不了软件商店(别问我为什么) 所以手动安装 1 下载文件 在firefox下下载 *****.tar.gz 压缩包 ,并解压(一般目录在 /home 当前用户下的 下载目录下) adobe官网 ...