280 条题解
-
0眉宇 LV 6 @ 2010-03-31 13:12:35
program p1096;
var
x,l :integer;
cun :integer;
i :integer;
begin
for i:=1 to 12 do
begin
readln(x);
if x>l+300 then begin writeln(-i);halt;end;
cun:=cun+(l+300-x) div 100;
l:=(l+300-x) mod 100;
end;
writeln(l+120*cun);
end. -
02010-03-29 21:34:24@
不用用数组的 读一行处理一行 这个省很多的
-
02010-03-18 21:30:10@
var
a:array[1..12] of integer;
i,m,n:integer;
begin
for i:=1 to 12 do
readln(a[i]);
m:=0;
n:=0;
for i:=1 to 12 do
if a[i]>m+300
then begin writeln(-i); halt; end
else begin
n:=n+(m+300-a[i]) div 100*100;
m:=(m+300-a[i]) mod 100;
end;
writeln(m+n*120 div 100);
end. -
02009-11-19 18:18:10@
..我想知道有两个空白标准行输出是什么意思?~……
-
02009-11-10 17:14:33@
program shui;
var i,total,p:integer;
a:array[1..12] of integer;
begin
for i:=1 to 12 do read(a[i]);
for i:=1 to 12 do
begin
total:=total+(300-a[i]);
if total100 then
begin
p:=p+(total div 100);
total:=total mod 100;
end;
end;
writeln(p*120+total);
readln;
readln;
end. -
02009-11-08 15:14:12@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:100000ms -
02009-11-08 09:30:00@
var a:array[1..12] of integer;
i,q,x,jx:integer;
begin
for i:=1 to 12 do
readln(a[i]);
i:=0;
q:=0;
while q>=0 do
begin
i:=i+1;
q:=q+300-a[i];
if q>=100 then
begin
jx:=jx+(q div 100)*100;
q:=q-(q div 100)*100;
end;
if (i=12) and (q>=0) then
begin
x:=q;
q:=-1;
end;
end;
if i12 then writeln('-',i)
else writeln(jx*1.2+x:0:0);
end. -
02009-11-06 23:58:53@
var a:array[1..12] of integer;
i,j,total,s:integer;
f:boolean;
begin
for i:=1 to 12 do
readln(a[i]);
total:=0;f:=true;
for i:=1 to 12 do
begin
total:=total+300-a[i];
if total>=100 then begin s:=s+100*(total div 100);
total:=total mod 100;
end;
if total -
02009-11-06 20:52:29@
var
a:array[1..13]of integer;
sum,i,np:integer;
begin
for i:=1 to 12 do
readln(a[i]);
sum:=0;
for i:=1 to 12 do
if 300-a[i]300 then
begin
writeln(-i);
break;
end else
if i=13 then
writeln(sum+sum*2/10+np:0:0);
end. -
02009-11-03 21:32:40@
提交四次……个囧啊。原来要取整……
-
02009-11-01 21:04:14@
???????????????????????????????????????????????????????????????????????????????
-
02009-10-28 15:13:29@
#include "stdio.h"
int main()
{
int budget[13]={0};
int hand[13]={0};
int save[13]={0};
int i,k,j;
int mark=0;
double all=0;
for(i=1;i=0)
{
save[i]=hand[i]/100*100;
hand[i]=hand[i]-save[i];
}
}}
if(mark>=0)
{
for(i=1;i -
02009-10-25 09:55:44@
var a:array[1..12]of integer;
I,total,p:integer;
begin
total:=0;
for i:=1 to 12 do
readln(a[i]);
for i:=1 to 12 do
begin
total:=total+(300-a[i]);
if total=100 then
begin
p:=p+total div 100;
total:=total mod 100;
end;
end;
writeln(p*120+total);
end. -
02009-10-24 16:43:45@
program P1096(input,output);
var
i:integer;
hand,save,monthhand:integer;
money:array[1..12] of integer;
begin
hand:=0;save:=0;
for i:=1 to 12 do
begin
readln(money[i]);
monthhand:=300+hand-money[i];
if monthhand -
02009-10-23 22:13:13@
……晕死
-
02009-10-23 20:59:17@
晕。。。
还算自己的钱。。。。。。 -
02009-10-22 21:52:12@
失败啊,这题竟然叫了两次~~。
第一次输出忘记取整了。
结果就:
编译通过...
├ 测试数据 01:答案错误...程序输出比正确答案长
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案错误...程序输出比正确答案长
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案错误...程序输出比正确答案长
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案错误...程序输出比正确答案长
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案错误...程序输出比正确答案长
├ 测试数据 10:答案错误...程序输出比正确答案长
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:40 有效耗时:0msprogram P1096;
var i,s,m:longint;
a:array[1..12] of longint;
begin
for i:=1 to 12 do readln(a[i]);
s:=0; m:=0;
for i:=1 to 12 do
begin
s:=300-a[i]+s;
if s -
02009-10-21 13:38:04@
#include
main()
{
int ys[12];
cin>>ys[0]>>ys[1]>>ys[2]>>ys[3]>>ys[4]>>ys[5]>>ys[6]>>ys[7]>>ys[8]>>ys[9]>>ys[10]>>ys[11];
int money[12]={300,300,300,300,300,300,300,300,300,300,300,300};
int save=0,i=1,monthsave=0;
for(;i=2)money+=money;
if(money -
02009-10-21 13:14:04@
program p1096;
var
x,l :integer;
cun :integer;
i :integer;
begin
for i:=1 to 12 do
begin
readln(x);
if x>l+300 then begin writeln(-i);halt;end;
cun:=cun+(l+300-x) div 100;
l:=(l+300-x) mod 100;
end;
writeln(l+120*cun);
end.
水啊~~~~~~~ -
02009-10-18 11:25:13@
var
n,k,y,i,s,m:longint;
begin
assign(input,'save.in');reset(input);
assign(output,'save.out');rewrite(output);
n:=300;
s:=0;
k:=0;
for i:=1 to 12 do
begin
readln(m);
y:=k+300-m;
if y>=0 then
if y>=100 then
begin
inc(s,y div 100);
k:=y mod 100;
end
else k:=y
else begin
writeln(-i);
close(input);
close(output);
halt;
end;
end;
writeln(s*120+k);
close(input);
close(output);
end.