Minimum Integer
https://codeforces.com/contest/1101/problem/A
题解:如果小于l,那么肯定是d,如果大于r那么是(r/d+1)*d;
/*
*@Author: STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k,q;
int ans,cnt,flag,temp;
int a[N];
char str;
int main()
{
#ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout);
#endif//scanf("%d",&n);scanf("%d",&t);while(t--){scanf("%d%d%d",&n,&m,&k);if(k<n){printf("%d\n",k);}else{printf("%d\n",(m/k+1)*k);}}//cout << "Hello world!" << endl;return 0;
}
Minimum Integer相关推荐
- CF1101A Minimum Integer 模拟
题意翻译 题意简述 给出qqq组询问,每组询问给出l,r,dl,r,dl,r,d,求一个最小的正整数xxx满足d∣x d | x\ d∣x 且x̸∈[l,r] x \not\in [l,r]x̸∈[l ...
- 一文带你了解被 BATJ 问烂的 TopK 问题
作者:CyC2018 链接:https://www.nowcoder.com/discuss/150681 问题描述 找出一组数最大的 K 个数. 一般解法 Leetcode : 215. Kth L ...
- Codeforces Round #440 (Div. 2, based on Technocup 2018 Elimination Round 2)
一场挺简单的CF,但是我打炸了啊 A. Search for Pretty Integers time limit per test 1 second memory limit per test 25 ...
- python数字类型-Python数字类型及其操作
数字类型 Python 语言提供了3种数字类型:整数.浮点数和复数. 布尔型 In addition, Booleans are a subtype of integers. 整数类型(int)与数学 ...
- Servlet3.0 multipart 文件上传技术
Servlet3.0 javaConfig配置 传统的servlet都是在web.xml中配置,从Servlet 3.0开始提供了ServletContainerInitializer接口,允许使用代 ...
- 【测试面试题】显示输入数字中的最大值
测试面试题 此模块致力于我遇到过的面试题,希望可以给大家带来帮助!!! 显示输入数字中的最大值 编写程序,使其: 从控制台读取数字 N(必须大于 0) 再从控制台读取 N 个数字 显示 N 个输入数字 ...
- Testing and Test-First Programming
Testing levels Unit testing 单元测试 测试某一小部分代码的正确性,尤其是测试某个函数. Integration testing 集成测试 The combined exec ...
- 2020 我的C++学习之路 C++PrimerPlus第五章课后习题
以C++ Primer Plus为参考书籍,自身归纳知识点,加深记忆.仅供参考,DEV C++已通过编译运行 . 练习1 #include<iostream>int main() {int ...
- CodeForce 237C Primes on Interval(二分+ 素数筛法)
题目链接:http://codeforces.com/problemset/problem/237/C Primes on Interval time limit per test 1 second ...
最新文章
- Android 各种工
- iOS之深入解析事件传递的响应链
- 组装电脑配置单报价_组装电脑配置单推荐,性价比高的游戏、画图和办公全能配置电脑!...
- 联想高校AI精英挑战赛中大收官,“人工智能眼科机器人”获全国总决赛最后入场券
- [转载] Python轻量Web框架Flask使用
- 库、教程、论文实现,这是一份超全的PyTorch资源列表(Github 2.2K星)
- qpieslice 渐变效果_在IE9中使用CSS3 PIE的线性渐变不起作用,IE8可以
- 彩色图像灰度化 (RGB ⇒ Gray )(RGB ⇒ YUV)(Verilog)
- 将类似html数据打印机,白激光打印机的工作原理.doc
- MySQL中order by的使用
- opencv视频拼接 opencv视频拼接优化
- jQuery 教程 jQuery入门学习教程
- R语言主题风格—ggthemes和hrbrthemes包绘图风格总览参考手册
- 第三方推广——《互联网运营的知识体系与整体逻辑》笔记(十二)
- python 矢量场的构造、计算;通过 matplotlib 作图、分析、筛选符合要求的像素点
- Android 热修复原理解析
- 节日贺卡python制作
- 快速查询快递物流,根据更新量筛选出只揽收的单号
- Visual Studio主题与配色方案
- 客服正全面转向云化 没想到带头大哥是文思海辉
热门文章
- pptx和ppt计算机二级,计算机二级Ms office考试PPT考点总结.pptx
- 计算机制图实训心得体会,绘图实训心得体会
- escplise使用教程_eclipse使用教程
- ### Error building SqlSession.### The error may exist in entity/UserMapper.xml
- java中的基本数据类型_java的基本数据类型有哪些
- cad加载插件快捷键命令_cad自动加载lsp插件,这一种方法你肯定没用过!
- 二十五、深入Python中的协程
- 直播 | EMNLP 2020论文解读:从上下文学习还是从实体名字学习?
- 更深的编码器+更浅的解码器=更快的自回归模型
- 脑电情绪识别:脑功能连接网络与局部激活信息结合