1樓:絕_w_醒
角谷猜想:
vara:longint;
begin
readln(a);
while a>1 do
begin
if a mod 2=0 then begin writeln(a,'/2=',a div 2);a:=a div 2;end
else begin writeln(a,'*3+1=',a*a+1);a:=a*3+1;end;
end;
end.
2樓:super聰明小子
獎學金:
varn,i,x,t,m:longint;
s,mi:string;
xm:array[1..100] of string;
qm,bj,j:array[1..100] of longint;
gb,xb,lw:array[1..100] of boolean;
begin
readln(n);
for i:=1 to n do
begin
readln(s);
x:=pos(' ',s);
xm[i]:=copy(s,1,x-1);
delete(s,1,x);
x:=pos(' ',s);
val(copy(s,1,x-1),qm[i]);
delete(s,1,x);
x:=pos(' ',s);
val(copy(s,1,x-1),bj[i]);
delete(s,1,x);
if s[1]='y' then
gb[i]:=true;
if s[3]='y' then
xb[i]:=true;
delete(s,1,4);
val(s,x);
if x>=1 then
lw[i]:=true;
if (qm[i]>80) and lw[i] thenj[i]:=j[i]+8000;
if (qm[i]>85) and (bj[i]>80) thenj[i]:=j[i]+4000;
if (qm[i]>90) then
j[i]:=j[i]+2000;
if (xb[i]) and (qm[i]>85) thenj[i]:=j[i]+1000;
if (gb[i]) and (bj[i]>80) thenj[i]:=j[i]+850;
t:=t+j[i];
if j[i]>m then
begin
m:=j[i];
mi:=xm[i];
end;
end;
writeln(mi);
writeln(m);
writeln(t);
end.
角股:var
n:longint;
begin
readln(n);
while n<>1 do
begin
case n mod 2=0 of
true:
begin
writeln(n,'/2=',n div 2);
n:=n div 2;
end;
false:
begin
writeln(n,'*3+1=',n*3+1);
n:=n*3+1;
end;
end;
end;
end.
全是模擬,不用解釋
pascal題目非常數,求程式,pascal題目非常數,求程式
var n,i longint function sum k longint longint var i,s longint begin s 0 i 2 while k 1 do begin while k mod i 0 do begin s s i k k div i end inc i end...
PASCAL簡單的題目,求答案
type ta array 1.10 of integer function arrmax arr ta n integer integer begin if n 1 then result arr 1 else result max arrmax arr,n 1 arr n end vara ta...
求下列習題答案,求下列題目的答案答案
哀霖君 選擇1,c 2,c3,d 4,c5,a 6,b7,d 8,a9,c 10,a填空一 1,鐘鳴鼎食 言重九鼎 舉鼎拔山 九鼎不足2,鬼鬼祟祟 落井下石 明哲保身 啞口無言 雜亂無章 死氣沉沉 3,遠矚 滿招損,謙受益 胸羅萬卷 大公無私二醫學生 真誠的心 女兒 史冊 故鄉書信酒 古國相思兄弟三...