Posted on 五月 9th, 2008.
高精度,求a^b-b^a.
直接发程序.
{ SGU 112; a^b-b^a - sqybi’s code}//for my winstyprogram sgu112_sqybi; const ll = 100; rr = 10000;
type arr = array[1..ll+1]of longint;
var a, b, i: longint; t1, r1, t2, r2, t: arr;
procedure mult(a, b: arr; var c: arr); var i, j: longint; begin fillchar(c, sizeof(c), 0); for i:=1 to ll […]
Read Full Post |
Make a Comment ( None so far )
Posted on 五月 9th, 2008.
最后一次写水题的题解…太麻烦了..懒得写了.
随便算一下就好.
{ SGU 115; Calendar - sqybi’s code}//for my winstyprogram sgu115_sqybi; const p: array[1..12]of longint = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var n, m, s, i: longint;
begin readln(n, m); if (m > 12) or (n > p[m]) then writeln(’Impossible’) else begin s := n; for i:=1 […]
Read Full Post |
Make a Comment ( None so far )
Posted on 五月 9th, 2008.
斐波那契前n项和.写了个打表程序玩玩,结果33ms…真无语.
打表太ws,不发程序.发了也没用=.=
阅读(70 次)
Read Full Post |
Make a Comment ( None so far )