
Big Num
iDev9
iOS Developer
展开
-
hdu1002A + B Problem II
<br />题目:hdu1002<br /> <br />总结:本题之所以会WA几次,是由于没有把 system("pause"); 删除,这是应该注意的地方。虽然杭电等网站支持system,<br /> <br />但是程序会运行到这句话,就会出现wrong answer,因此,一般要把这句话删除再提交。<br /> <br />代码:<br /> <br />//You may assume the length of each integer will not exceed 1000.<br /><b原创 2010-08-18 22:12:00 · 444 阅读 · 0 评论 -
高精度计算模板
**********************************高精度加,减,乘,除,取模,模板**********************************/#include #include using namespace std;inline int compare(string str1, string str2){ if(str1.size() > str2.size()) //长度长的整数大于长度小的整数 retu转载 2010-09-11 16:20:00 · 453 阅读 · 0 评论 -
hdu1002
题目:hdu1002 tzc1192方法:大数加法代码:#include #include using namespace std;void Add(char *str1, char *str2, char *str3) { // str3 = str1 +原创 2011-07-28 11:06:16 · 579 阅读 · 0 评论 -
tzc1051 A × B problem
题目:tzc1051方法:大数乘法 大数乘大数代码:#include #include using namespace std;void mult(char a[],char b[],char s[]){ int i,j,k=0,alen,blen,sum=0,res原创 2011-07-28 11:02:40 · 541 阅读 · 0 评论 -
hdu1042
题目链接:hdu1042 tzc1213代码一:转自 http://blog.pfan.cn/yzfy/25193.html ,有所改动。#include#define N 10005 int main(){ int t,a,b; int n;转载 2011-07-28 11:22:12 · 1855 阅读 · 0 评论 -
pku1047 Round and Round We Go
题目链接:pku1047 hdu1313 tzc1086方法:大数乘法 大数乘小数代码://tzc1086 hdu1313//注意string与cstring的不同//string类定义的是主要是运算符重载,//而cstring类相当于string.h,包原创 2011-07-28 10:57:19 · 796 阅读 · 0 评论