高精:
{ Author:wzx961008 Problem:UVa 10106-Product Verdict:Accepted Language:PASCAL Run Time:0.020s Submission Date:2011-02-09 11:43:13 } var a,b:string; function HighMultiply(s1,s2:string):ansistring; var a,b,c:array[1..1000]of integer; lena,lenb,lenc,i,j,x:integer; begin fillchar(a,sizeof(a),0); fillchar(b,sizeof(b),0); fillchar(c,sizeof(c),0); HighMultiply:=''; lena:=length(s1); lenb:=length(s2); for i:=1 to lena do a[lena-i+1]:=ord(s1[i])-ord('0'); for i:=1 to lenb do b[lenb-i+1]:=ord(s2[i])-ord('0'); for i:=1 to lena do begin x:=0; for j:=1 to lenb do begin x:=a[i]*b[j]+x div 10+c[i+j-1]; c[i+j-1]:=x mod 10; end; c[i+j]:=x div 10; end; lenc:=i+j; while (c[lenc]=0) and (lenc>1) do dec(lenc); for i:=lenc downto 1 do HighMultiply:=HighMultiply+chr(c[i]+48); end; begin while not eof do begin readln(a); readln(b); writeln(HighMultiply(a,b)); end; end.
題目:VJ:UVa400 代碼實現: #include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; int
題目:UVa12563 代碼實現: #include<iostream> #include<cstdio> #include<utility> #include<algorithm> using namespace std; typ
題目鏈接: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1756 Andy, 8, ha
題目鏈接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342 Palindrome
UVa OJ The Dole Queue 救濟金髮放 133 題目大意: 給定一個整數 N ,然後逆時針排列從 1 到 N ,然後給定兩個整數 k 和 m ,順時針從 1 數到 k,選定這個數(假設爲 w),逆時針(從N)開始,然後數
水題,直接模擬: { Author:wzx961008 Problem:UVa 10302-Summation of Polynomials Verdict:Accepted Language:PASCAL Run Time:0
題目能夠水成這樣: { Author:wzx961008 Problem:UVa 11727-Cost Cutting Verdict:Accepted Language:PASCAL Run Time:0.012s Subm
純數學題,搞了好久: { Author:wzx961008 Problem:UVa 10994-Simple Addition Verdict:Accepted Language:PASCAL Run Time:0.028s
簡單題: { Author:wzx961008 Problem:UVa 490-Rotating Sentences Verdict:Accepted Language:PASCAL Run Time:0.016s S
巨水: { Author:wzx961008 Problem:UVa 11636-Hello World! Verdict:Accepted Language:PASCAL Run Time:0.012s Submission
非常簡單的模擬: { Author:wzx961008 Problem:UVa 445-Marvelous Mazes Verdict:Accepted Language:PASCAL Run Time:0.004s S
水題,高精: { Author:wzx961008 Problem:UVa 495-Fibonacci Freeze Verdict:Accepted Language:PASCAL Run Time:0.660s Sub
UVa OJ 1607 - Gates Problem 描述起來很麻煩,大家還是直接去OJ站看吧。我之後也會解釋一下題目的意思 題目鏈接: 1607 - Gates Input The first line of the in
UVa OJ 1609 - Foul Play Problem n支隊伍(2≤n≤1024,且n是2的整數冪)打淘汰賽,每輪都是兩兩配對,勝者進入下一輪。每支隊伍的實力固定,並且已知每兩支隊伍之間的一場比賽結果。你喜歡1號隊。雖然
Problem You are listening to your music collection using the shuffle function to keep the music surprising. You ass