题目1015:还是A+B
来源:互联网 发布:京东首届网络电影节 编辑:程序博客网 时间:2024/06/05 09:03
#include "iostream"#include "stdio.h"#include <vector>#include <cstring>#include <algorithm>#include <string>#include <string.h>#include <stack>using namespace std;//1015int a,b,k;int main(){ //freopen("input.txt","r",stdin); while(cin>>a>>b>>k){ if(a==0&&b==0) break; int t=a+b; int x=0,y=0; while(k--){ x=x*10+a%10; a/=10; y=y*10+b%10; b/=10; } if(x==y) printf("-1\n"); else printf("%d\n",t); } return 0;}/************************************************************** Problem: 1015 User: cust123 Language: C++ Result: Accepted Time:0 ms Memory:1520 kb****************************************************************/
0 0
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 题目1015:还是A+B
- 九度题目1015:还是A+B
- 37- 题目1015:还是A+B
- 九度题目1015还是A+B
- 题目37:还是A+B
- 题目1126: 还是A+B
- 九度OnlineJudge题目1015:还是A+B
- Elasticsearch入门1
- (继承)Problem A: Person类与Student类的关系
- C++Primer Plus(第六版) 第六章 第二题
- PAT_乙级_1002_筱筱
- md5.js(提交前加密)
- 题目1015:还是A+B
- 用户界面线程AfxBeginThread的使用
- js 作用域 .局部变量,全局变量
- 分治算法
- 数据类型转换的坑
- ReactNative-通过setState控制组件的更新和变化
- 三级-下拉菜单
- Extjs6开发环境搭建
- python操作Excel