Discount
来源:互联网 发布:加权并查集算法 编辑:程序博客网 时间:2024/05/02 04:57
Discount
Time Limit:1sMemory limit:32MAccepted Submit:54Total Submit:117
Problem Description
Input
The first line contains t (1 ≤ t ≤ 20), the number of test cases followed. Each line contains two integers P and D(1 ≤ P ≤ 500, 1 ≤ D ≤ 99), the initial price and discount.OutPut
For each test case, print the amount of money Mr.Richman would like to pay.Sample Input
5 50 30 104 17 500 4 498 6 40 5
Sample Output
388748047838
Original: 2009 NIT Cup National Invitation Contest Practice Session
http://acm.fzu.edu.cn/problem.php?pid=1773
这一题是一种求一个数中是否含有某个数,这题里面求的是是否含有8这个数,比如448,458,380,如果没有,那就从个位逐渐加1,直到加最少的数就使这个数含有数字8。本程序的思想是这样的,用一个数组存放这个数的每一位:个位,十位,百位。然后一位一位的判断是否含有数字8,如果没有个位的数就加1,有点类似于高精度的加减法。
- Discount
- Discount
- discount
- HDU4104----Discount
- Discount 折扣
- HDOJ4104 Discount
- hdu4104 Discount
- Maximal Discount
- FOJ 1773 Discount
- HDU:4104 Discount
- christian louboutin discount Nowadays
- Discount Louis Vuitton AdJUo
- Discount Louis Vuitton wiL9D
- Discount Louis Vuitton vBC26
- discount nike nfl jerseys
- HDU 4104 Discount
- Discount Louis Vuitton Bags HmoDD
- Authentic Louis Vuitton Discount mf0TH
- DirectX、DirectShow关系等
- 夏天里的一阵凉风
- 泛型算法系列12:fill()&&fill_n()
- 安装APK文件到Android模拟器和Android sdcard的使用
- web工程之启动时spring的dtd错误 [/WEB-INF/applicationContext.xml
- Discount
- [转]键盘上每个按键的用途
- 开发者不可不知的PHP框架深度解析
- 推出自己的产品!
- 众数问题
- Linux未来猜想:被遗忘还是终结Windows?
- 数据库簇的操作
- 中移动与腾讯迟早必有一战
- pku1915