1016. 部分A+B (15)
来源:互联网 发布:js dom编程艺术 pdf 编辑:程序博客网 时间:2024/06/03 16:00
#include<stdio.h>#include<stdlib.h>#include<string.h>long fun(char *str,int x, int len){ long result=0; int i=0; for(i=0; i<len; i++) { if(str[i]==x+'0') result = result*10 + x; } return result;}int main(){ char str1[11],str2[11]; int len1=0,len2=0,DA=0,DB=0; long a=0,b=0; scanf("%s %d %s %d",str1,&DA,str2,&DB); len1 = strlen(str1); len2 = strlen(str2); a = fun(str1,DA,len1); b = fun(str2,DB,len2); printf("%d",a+b); return 0;}
0 0
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1016. 部分A+B (15)
- 1015. 德才论 (25)
- 实战函数式编程:使用Ramda.js
- 【C++】LeetCode 179. Largest Number
- MySql的基本操作
- [神经网络与深度学习][计算机视觉]SSD编译时遇到了json_parser_read.hpp:257:264: error: ‘type name’ declared as function ret
- 1016. 部分A+B (15)
- #1015 : KMP算法 裸kmp
- 服务器--使用WordPress搭建个人博客
- C语言补充学习
- web.js.this详解
- 1017. A除以B (20)
- System Verilog视频学习笔记(9)- Inheritance
- jQuery的属性与样式
- 小白题解 Codeforces 794B Cutting Carrot