Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
汗...这几组数据我似乎全错了In Reply To:...... Posted by:zymx at 2005-09-07 15:23:43 > Program Block: > > PrintStream out=System.out; > int N=443; > for(int i=1;i<=N;i++)out.print(A(i));out.println(); > for(int i=1;i<=N;i++)out.print(B(i));out.println(); > > StringBuilder b1=new StringBuilder(),b2=new StringBuilder(); > for(int i=1;i<1000;i++){b1.append(i);b2.append(i*i);} > out.println(b1.substring(0,N)); > out.println(b2.substring(0,N)); > > Console Output: > 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318 > 14916253649648110012114416919622525628932436140044148452957662567672978484190096110241089115612251296136914441521160016811764184919362025211622092304240125002601270428092916302531363249336434813600372138443969409642254356448946244761490050415184532954765625577659296084624164006561672468897056722573967569774479218100828184648649883690259216940996049801100001020110404106091081611025112361144911664118811210012321125441276912996132251345613689 > 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318 > 14916253649648110012114416919622525628932436140044148452957662567672978484190096110241089115612251296136914441521160016811764184919362025211622092304240125002601270428092916302531363249336434813600372138443969409642254356448946244761490050415184532954765625577659296084624164006561672468897056722573967569774479218100828184648649883690259216940996049801100001020110404106091081611025112361144911664118811210012321125441276912996132251345613689 > > Result: > 440 442 > 441 443 > 8318+3689=12007 > ~ 2 is right > Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator