#include #include using namespace std;int main(){ string n; while(cin>>n,n!="0"){ int s=0,l=n.length(); for(int i=0;i9) s=s/10+s%10; cout...
分类:
其他好文 时间:
2014-08-02 01:30:32
阅读次数:
382
#include #include using namespace std;int main(int argc, char *argv[]){ double a,b; cin>>a; while (cin>>b) { if (b==999) { ...
分类:
其他好文 时间:
2014-08-02 01:27:12
阅读次数:
297
#include #include using namespace std;int main(int argc, char *argv[]){ int i,n,m; string s; while(cin>>m) { while(m--) { cin>>s; n=1; if(s.si...
分类:
其他好文 时间:
2014-08-01 22:59:32
阅读次数:
352
-#include using namespace std;int main(int argc, char *argv[]){ int n,i,sum; string s; cin>>n; while(n--) { cin>>s; for(i=0,sum=1;s[i];i++) { if(...
分类:
其他好文 时间:
2014-08-01 22:51:42
阅读次数:
214
#include using namespace std;int a[1000];int f(int n){ int k=0; while(n) { a[k++]=n%2; n/=2; } return k;}int main(int argc, char *argv[]){ int n,m,...
分类:
其他好文 时间:
2014-08-01 22:45:22
阅读次数:
248
QuicksumTime Limit: 2 Seconds Memory Limit: 65536 KBA checksum is an algorithm that scans a packet of data and returns a single number. The idea is...
分类:
其他好文 时间:
2014-08-01 22:43:32
阅读次数:
333
Geometry Made SimpleTime Limit: 2 Seconds Memory Limit: 65536 KBMathematics can be so easy when you have a computer. Consider the following example. ....
分类:
其他好文 时间:
2014-08-01 19:27:32
阅读次数:
308
Reverse TextTime Limit: 2 Seconds Memory Limit: 65536 KBIn most languages, text is written from left to right. However, there are other languages whe....
分类:
其他好文 时间:
2014-08-01 19:23:32
阅读次数:
202
#include using namespace std;int main(int argc, char *argv[]){ int i,n,m; char data1[10][20],data2[10][20]; scanf("%d",&n); for (i=0;i...
分类:
其他好文 时间:
2014-08-01 04:42:41
阅读次数:
239
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2947错误----#include#include#include#includeusing namespace std;int main(){ int t,n,m,i; .....
分类:
其他好文 时间:
2014-08-01 04:41:41
阅读次数:
202