小明A+B(HDU 2096)
来源:互联网 发布:花生壳是什么软件 编辑:程序博客网 时间:2024/06/05 19:21
小明A+B
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 24662 Accepted Submission(s): 11711
Problem Description
小明今年3岁了, 现在他已经能够认识100以内的非负整数, 并且能够进行100以内的非负整数的加法计算.
对于大于等于100的整数, 小明仅保留该数的最后两位进行计算, 如果计算结果大于等于100, 那么小明也仅保留计算结果的最后两位.
例如, 对于小明来说:
1) 1234和34是相等的
2) 35+80=15
给定非负整数A和B, 你的任务是代表小明计算出A+B的值.
对于大于等于100的整数, 小明仅保留该数的最后两位进行计算, 如果计算结果大于等于100, 那么小明也仅保留计算结果的最后两位.
例如, 对于小明来说:
1) 1234和34是相等的
2) 35+80=15
给定非负整数A和B, 你的任务是代表小明计算出A+B的值.
Input
输入数据的第一行为一个正整数T, 表示测试数据的组数. 然后是T组测试数据. 每组测试数据包含两个非负整数A和B(A和B均在int型可表示的范围内).
Output
对于每组测试数据, 输出小明A+B的结果.
Sample Input
235 8015 1152
Sample Output
1567
Source
HDU 2007-Spring Programming Contest
#include <stdio.h>#include <string.h>#include <stdlib.h>int main(){ int n,i; int a,b; scanf("%d",&n); while (n--) { scanf("%d %d",&a,&b); a=a%100; b=b%100; int sum=a+b; printf("%d\n",sum%100); } return 0;}
0 0
- hdu 2096 小明A+B
- HDU 2096 小明A+B
- HDU 2096 小明A+B
- hdu-2096-小明A+B
- hdu 2096 小明A+B
- 小明A+B(HDU 2096)
- hdu-2096-小明A+B
- HDU 2096 小明A+B
- HDU 2096 小明A+B
- hdu 2096 小明A+B
- hdu 2096 2014731 小明A+B
- HDU 2096 小明A+B
- HDU 2096 小明A+B
- hdu 2096 小明A+B 刷题
- hdu 2096 小明A+B
- HDU--2096 小明A+B
- HDU 2096-小明A+B-水题
- hdu-2096-小明A+B
- 日访问泰国原合同
- 委托方肝炎4晚上
- HTTP协议 (四) 缓存
- 关于链表中头指针和头结点的理解
- spring security3.1 不再支持 filters="none" 解决办法
- 小明A+B(HDU 2096)
- 那些年,在Fragment中犯的错
- 并发数据(锁)ReaderWriterLockSlim
- redis基本操作命令(一)
- jQueryUI widget原理
- OCP 1Z0 052 118
- PAT1018. 锤子剪刀布 (20)
- jquery 最新全选,全不选,反选
- HTTP协议 (三) 压缩