POJ 2602 Superlong sums 大整数求和
来源:互联网 发布:网络婚骗手段 编辑:程序博客网 时间:2024/06/06 00:43
题意:大整数相加。
#include <cstdio>int array[1000002];int main(){__int64 n, i;char a, b;int carry = 0;scanf( "%I64d", &n ); getchar();for ( i = 0; i < n; i++ ){a = getchar();getchar(); b = getchar();getchar();array[i] = a - '0' + b - '0';}for ( i = n - 1; i > 0; i-- ){if ( array[i] >= 10 ){array[i] -= 10;array[i-1]++;}}for ( i = 0; i < n; i++ )putchar( array[i] + '0' ); putchar('\n');return 0;}
- POJ 2602 Superlong sums 大整数求和
- POJ 2602 Superlong sums
- POJ 2602Superlong sums
- POJ 2602 Superlong sums
- poj-2602-Superlong sums
- poj 大数 - 2602 Superlong sums
- POJ 2602 Superlong sums G++
- 北大ACM POJ 2602 Superlong sums
- Poj 2602 Superlong sums(大数相加)
- POJ 2602 Superlong sums (高精度,模拟,水题)
- Poj OpenJudge 百练 2602 Superlong sums
- POJ 2602 Superlong sums(模拟大数加法)
- POJ 2602 Superlong sums(高精度)
- POJ 2602|URAL 1048|Superlong Sums|高精度加法
- 北大 ACM 2602 Superlong sums
- POJ2602 Superlong sums
- ural 1048 Superlong Sums
- Poj2602 Superlong sums
- shell脚本执行方法及差异
- Windows下php sendmail配置实现
- setsockopt设置socket状态
- mongodb 学习笔记六 Updating
- 跑步成绩计算评分数据库查询工具
- POJ 2602 Superlong sums 大整数求和
- 感谢你们需要我
- POJ 1083 Moving Tables 贪心
- 单参数委托通用类 C#
- 天龙八部源码描述
- 令我崩溃欲死的tomact版本问题
- 少壮不努力,老大徒伤悲
- 09-05 HDU_Steps4.2 BFS HDU1242 HDU1548 HDU1372 HDU1728 HDU1252 HDU2612 HDU2653 HDU2531
- POJ 1050 To the Max DP