题面

题意:每天有K本书,你最多看P本一天,问N天后多少本书没有看

题解:ans=(K-P)*N; 注意一点就是P>=K的时候,ans=0;

 #include<bits/stdc++.h>
using namespace std;
#define lld long long
lld x,y,z;
int main()
{
int T;
scanf("%d",&T);
while (T--)
{
scanf("%lld%lld%lld",&x,&y,&z);
printf("%lld\n",max((x-y)*z,0LL));
}
}

Gym-101915C Shahhoud Training Hussain 模拟的更多相关文章

  1. Gym 100646 Problem C: LCR 模拟题

    Problem C: LCR 题目连接: http://codeforces.com/gym/100646/attachments Description LCR is a simple game f ...

  2. Codeforces Gym 100269B Ballot Analyzing Device 模拟题

    Ballot Analyzing Device 题目连接: http://codeforces.com/gym/100269/attachments Description Election comm ...

  3. codeforces gym 100286 I iSharp (字符串模拟)

    题目链接 给定一个字符串.输入是int& a*[]&, b, c*; 输出是 int&&[]* a;int& b;int&* c; 输入格式里逗号后面一 ...

  4. Gym - 100203G Good elements 水+模拟

    题意:good element的定义是a[i]在1~i-1中任取三个数(可以重复)的和能等于a[i] 思路:vis[x]标记一下任两个数的和,处理a[i]时枚举1~i-1判断vis[a[i] - a[ ...

  5. Gym 101915

    Gym - 101915A  Printing Books 题意:有一本书,从第X页开始,一共用了n位数字,求此书一共多少页.99就是两位数字,100就是三位数字. 思路:直接模拟即可,我用了一个hi ...

  6. Gym - 101810A ACM International Collegiate Programming Contest (2018)

    bryce1010模板 http://codeforces.com/gym/101810/problem/A 大模拟,写崩了,代码借队友的...... 注意处理段与段的连接问题: #include&l ...

  7. 常用增强学习实验环境 II (ViZDoom, Roboschool, TensorFlow Agents, ELF, Coach等) (转载)

    原文链接:http://blog.csdn.net/jinzhuojun/article/details/78508203 前段时间Nature上发表的升级版Alpha Go - AlphaGo Ze ...

  8. ACM: Gym 101047K Training with Phuket's larvae - 思维题

     Gym 101047K Training with Phuket's larvae Time Limit:2000MS     Memory Limit:65536KB     64bit IO F ...

  9. 【模拟】ECNA 2015 I What's on the Grille? (Codeforces GYM 100825)

    题目链接: http://codeforces.com/gym/100825 题目大意: 栅栏密码.给定N(N<=10),密钥为一个N*N的矩阵,'.'代表空格可以看到,'X'代表被遮挡,还有密 ...

随机推荐

  1. Unity引擎GUI之Slider和Scrollbar

    Slider(滑动条):是一个主要用于形象的拖动以改变目标值的控件,他的最恰当应用是用来改变一个数值,最大值和最小值自定义,拖动滑块可在此之间改变,例如改变声音大小. Scrollbar(滚动条):是 ...

  2. MyEclipse 连接Oracle数据库(初学者必看)

    前言:刚接触Oracle数据库,便有一个需求,编写控制台程序,实现主人登录.数据库为Oracle.下面详细介绍一下MyEclipse 连接Oracle数据库.   package DbHelp; im ...

  3. What is the difference between PKCS#5 padding and PKCS#7 padding

    The difference between the PKCS#5 and PKCS#7 padding mechanisms is the block size; PKCS#5 padding is ...

  4. Java多线程--线程交替

    要求:借助同步机制,sleep()方法,join()方法,实现动画显示:甲线程:1.3.5.7.9乙线程:2.4.6.8.10丙线程:a.b.c.d.emain()线程输出:线程开始,线程结束 输出结 ...

  5. LOJ #6041. 「雅礼集训 2017 Day7」事情的相似度 LCT+SAM+线段树

    Code: #include<bits/stdc++.h> #define maxn 200003 using namespace std; void setIO(string s) { ...

  6. 【第三课】kaggle案例分析三

    Evernote Export 比赛题目介绍 TalkingData是中国最大的第三方移动数据平台,移动设备用户日常的选择和行为用户画像.目前,TalkingData正在寻求每天在中国活跃的5亿移动设 ...

  7. DOCKER - J2EE中容器:WEB容器、EJB容器

    转自:http://www.voidcn.com/article/p-yizkqdxp-zg.html

  8. C++判断质数

    using namespace std; bool isPrimeNum(int n) { if(n<2) return true; for(int i=2;i*i<=n;i++) { i ...

  9. 1069. The Black Hole of Numbers

    For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in ...

  10. python实现RGB转化为灰度图像

    问题: 我正尝试使用matplotlib读取RGB图像并将其转换为灰度.在matlab中,我使用这个: 1 img = rgb2gray(imread('image.png')); 在matplotl ...