純數學題,搞了好久:
{ Author:wzx961008 Problem:UVa 10994-Simple Addition Verdict:Accepted Language:PASCAL Run Time:0.028s Submission Date:2011-01-30 15:00:23 } var p,q:longint; function f(n:int64):int64; var ans:int64; i:longint; begin if n<=0 then exit(0); ans:=0; while n<>0 do begin inc(ans,(n div 10)*45); for i:=(n div 10)*10+1 to n do inc(ans,i mod 10); n:=n div 10; end; exit(ans); end; begin while true do begin readln(p,q); if (p=-1)and(q=-1) then break; writeln(f(q)-f(p-1)); 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 10106-Product Verdict:Accepted Language:PASCAL Run Time:0.020s Submission Da
簡單題: { 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