小璋
小璋
关注数: 6
粉丝数: 15
发帖数: 139
关注贴吧数: 6
2000年广东省信息学奥林匹克竞赛试题 一楼给百度
高精度四则运算 program gaojingdu;type newtype=array[0..200]of byte;var a,b,jieguo:newtype; biaozhi:char;{====================读入并处理A,B两个字符串}procedure chuli;var i:integer; a1,b1:string;begin readln(a1); readln(b1); a[0]:=length(a1); b[0]:=length(b1); for i:=1 to length(a1) do a[i]:=ord(a1[i])-ord('0'); for i:=1 to length(b1) do b[i]:=ord(b1[i])-ord('0');end;{===================加法}function jia(a,b:newtype):newtype;var tp:newtype; d,i:integer;begin fillchar(tp,sizeof(tp),0); if a[0]>b[0] then d:=a[0] else d:=b[0]; for i:=1 to d do begin tp[i]:=tp[i]+a[i]+b[i]; if tp[i]>9 then begin tp[i]:=tp[i]-10; tp[i+1]:=tp[i+1]+1; end; end; if tp[d+1]>0 then tp[0]:=d+1 else tp[0]:=d; jia:=tp;end;{=============================判断大数}function panduan(a,b:newtype):boolean;begin if a[0]>b[0] then tp:=true else if a[0]
杨辉三角 program yanghui;var b,n:integer; xie:array[1..100]of integer;procedure zuo(b,n:integer);var i:integer;begin inc(b); for i:=1 to n-b do write(' '); {打印空格} for i:=b downto 1 do {打印数字,如果不倒着循环会出现覆盖现象} begin xie[i]:=xie[i-1]+xie[i]; write(xie[i]:6); end; writeln;writeln; if b
马鞍数 program maanshu; {行小列大}var a:array[0..100,0..100]of integer; n:integer;procedure duru;var wi:text; i,j:integer;begin assign(wi,'maanshu.txt'); reset(wi); readln(wi,n); for i:=1 to n do begin for j:=1 to n do read(wi,a[i,j]); readln(wi); end; close(wi); for i:=1 to n do begin a[i,0]:=maxint; {行,0设最大} a[0,i]:=-maxint; {列,0设最小} end; for i:=1 to n do for j:=1 to n do begin if a[i,j] a[0,j] then a[0,j]:=a[i,j]; end;end;procedure shuchu;var i,j:integer;begin for i:=1 to n do for j:=1 to n do if a[i,0]=a[0,j] then writeln(a[i,j],'(',i,',',j,')');end;begin duru; shuchu; readln;end.
宣城信息学! 讨论PASCAL,信息学知识。
偶,七<1>班的来踩/. 踩吧.----------------- ----------------- ╄I believe,everything will be all right.╄ ╄→本朲莼孎虚构╭ァ_/)rǘ囿遇见;莼孎见鬼╲ █||▍▍|||▍██||▍▍|||▍██||▍█||▍▍||| ┋主页┋http://hi.baidu.com/willzone『欢迎访问』 ┋邮箱┋
[email protected]
┋QQ┋345297274┋┋█||▍▍
超级作弊可恶! 帐号:qqwei12个人信息http://passport.baidu.com/?business&aid=6&un=qqwei12#2举报网页http://zhidao.baidu.com/question/16594111.htmlhttp://zhidao.baidu.com/question/16594178.htmlhttp://zhidao.baidu.com/question/16594194.html抄袭:http://zhidao.baidu.com/question/15918918.htmlhttp://zhidao.baidu.com/question/15919460.html等等等等
刷分. http://zhidao.baidu.com/question/16113486.html?fr=idfn
大家好! №我dё地☆盘〓璋£吧开张了!呵呵
大家好! №我dё地☆盘〓璋£吧开张了!
1
下一页