#include #include using namespace std; int main() { char str[1234]; int s,len,sum; while(cin>>str>>s) { len=strlen(str); sum=0; for(int i... ...
分类:
其他好文 时间:
2018-03-05 13:47:06
阅读次数:
115
Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only i ...
分类:
其他好文 时间:
2017-07-25 21:10:02
阅读次数:
162
题意:给出一个大数,这个大数由两个素数相乘得到,让我们判断是否其中一个素数比L要小,如果两个都小,输出较小的那个。 分析:大数求余的方法:针对题目中的样例,143 11,我们可以这样算,1 % 11 = 1; 1×10 + 4 % 11 = 3; 3×10 + 3 % 11 = 0;我们可以把大数拆 ...
分类:
其他好文 时间:
2016-06-10 20:24:36
阅读次数:
126
Github最终优化代码:https://github.com/laiy/Datastructure-Algorithm/blob/master/sicily/1020.c题目如下:1020. Big IntegerConstraintsTime Limit: 1 secs, Memory Limi...
分类:
编程语言 时间:
2015-09-23 13:24:33
阅读次数:
196
一开始是的想法是用减法代替除法,一直减到被减数小于减数,所得的被减数就是余数。为了方便编程,还在减法中对齐了被减数和减数的位数。但过程还是比较麻烦,会超时。 1 #include "stdafx.h" 2 #include 3 #include 4 using namespace std; 5 in...
分类:
其他好文 时间:
2015-09-13 21:30:20
阅读次数:
180
Big NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5930Accepted Submission(s): 4146Problem ...
分类:
其他好文 时间:
2015-07-24 20:41:03
阅读次数:
121
Prepared for New AcmerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7477Accepted Submission(s): ...
分类:
其他好文 时间:
2015-07-05 14:58:34
阅读次数:
172
这道题 也就是大数除或者求模小数,不过听说java处理大数很方便,可是java学的一塌糊涂。。有心人用java做吧
奉上c语言代码:
#include
#include
int main()
{
char a[1000],c[1000],ch;
int b,i,j,r;
while(scanf("%s %c %d",a,&ch,&b)!=EOF)//a是存贮大数,c...
分类:
其他好文 时间:
2015-05-12 11:28:18
阅读次数:
173
The Embarrassed Cryptographer
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 11978
Accepted: 3194
Description
The young and very promising cryptographer...
分类:
其他好文 时间:
2014-07-20 22:32:43
阅读次数:
266