南邮 OJ 1829 A. Mysterious numbers - 1

来源:互联网 发布:java udp收数据不全 编辑:程序博客网 时间:2024/06/08 09:40

A. Mysterious numbers - 1

时间限制(普通/Java) : 3000 MS/ 9000 MS          运行内存限制 : 65536 KByte
总提交 : 72            测试通过 : 35 

比赛描述

See in Samples.

输入

The input contains two integers a1,a2 (0≤ai≤10^9), separated by a single space.

输出

Output a single integer.

样例输入

3 14
27 12
100 200

样例输出

44
48
102

提示

"See" in Samples.

题目来源

ACM爱好者协会





#include<iostream>using namespace std;int main(){int a1, a2, a3;while(scanf("%d %d", &a1, &a2) == 2){a3 = 0;while(a2){a3 = a3 * 10 + a2 % 10;a2 /= 10;}printf("%d\n", a1 + a3);}}


0 0