280 条题解

  • 0
    @ 2014-01-01 11:59:41

    Vijos 题解:http://hi.baidu.com/umule/item/2c997f8ed9600fdae596e017
    有疑问请留言 共同进步

  • 0
    @ 2013-10-26 12:38:25

    这个程序有错吗

    var
    sum,i,b:longint;
    a:array[0..100]of longint;
    begin
    for i:=1 to 12 do
    read(a[i]);
    for i:=1 to 12 do
    begin
    b:=b+300;
    if b>=a[i]
    then begin
    if (b - a[i])div 100>0
    then begin
    sum:=sum+(b -a[i]) div 100 *100;
    b:=b-(b - a[i])div 100*100;
    end
    end
    else begin
    write('-',i);
    exit;
    end;
    b:=b-a[i];
    end;
    write(sum*1.2+b);
    end.

  • 0
    @ 2013-10-22 22:36:39

    #include<cstdio>
    #include<cstdlib>
    #include<iostream>
    using namespace std;
    int main()
    {
    int a[13],dq=0,zqs=0;
    for(int i=1;i<=12;i++)
    cin>>a[i];
    for(int i=1;i<=12;i++)
    {
    dq+=300;
    if(dq-a[i]<0)
    {
    cout<<"-"<<i;
    return 0;
    }
    dq-=a[i];
    if(dq/100>0)
    {
    zqs+=(dq/100)*100;
    dq=dq-(dq/100)*100;
    }

    }
    cout<<zqs+zqs/5+dq;
    return 0;
    }

  • 0
    @ 2013-10-15 22:02:16

    #include <iostream>
    #include <cmath>
    #include <stdio.h>
    using namespace std;
    int main(){
    int a,b=0,c=0,i;
    for (i=1;i<=12;i++)
    {cin>>a;
    b+=300-a;
    if (b<0){
    printf ("-%d",i);
    return 0;}
    if (b>=100){
    c+=(b/100)*100;
    b%=100;}}
    printf ("%d",c+c/5+b);
    return 0;
    }

  • 0
    @ 2013-10-07 13:47:33

    var
    i,j,mone,keep,cost:longint;

    begin
    for i:=1 to 12 do begin
    readln(cost);
    inc(mone,300-cost);
    if mone<0 then begin
    writeln('-',i);
    halt;
    end else begin
    inc(keep,mone div 100);
    mone:=mone mod 100;
    end;
    end;
    writeln(120*keep+mone);
    end.

  • 0
    @ 2013-09-12 17:52:04

    var
    x,y,i,j:longint;
    begin
    y:=0;
    j:=0;
    for i:=1 to 12 do
    begin
    y:=y+300;
    readln(x);
    y:=y-x;
    if y<0 then
    begin
    write('-',i);
    halt;
    end;
    if y>=100 then
    j:=j+y div 100;
    y:=y mod 100;
    end;
    y:=y+j*120;
    writeln(y);
    end.

  • 0
    @ 2013-09-01 15:25:31

    C++代码
    #include<iostream>
    #include <math.h>
    #include <iomanip>
    using namespace std;
    int money,mum;
    int pre[13];
    int a,i,j,k;
    int main(){
    money=0;
    mum=0;
    for(i=1;i<=12;i++){
    cin>>pre[i];
    }
    for(i=1;i<=12;i++){
    money=money+300;
    money=money-pre[i];
    if (money<0){
    cout<<i*(-1)<<endl;
    return 0;
    }
    else{
    if(money>=100){
    a=money/100;
    mum=mum+a*100;
    money=money-a*100;
    }
    }
    }
    cout<<money+mum*1.2<<endl;
    }

  • 0
    @ 2013-08-26 11:12:09

    var a:array[0..13]of longint;
    i,j,k,l,m,n,p,t:longint;
    x:real;
    begin
    for i:=1 to 12 do
    readln(a[i]);
    l:=0;
    for i:=1 to 12 do
    begin
    l:=l+300;
    l:=l-a[i];
    if l<0 then begin writeln('-',i);halt;end;
    if l>=100 then begin t:=t+(l div 100)*100;l:=l mod 100;end;
    end;
    x:=t*1.2+l;
    writeln(x:0:0);
    end.

  • 0
    @ 2013-08-15 16:42:32

    此题水炸天。。。交出渣程供各位大牛BS
    CODE:
    var s,i,a,c:longint;
    begin
    for i:=1 to 12 do begin
    readln(a);
    s:=s+300-a;
    if s>=0 then begin
    c:=c+s div 100;
    s:=s mod 100;
    end;
    if s<0 then begin
    writeln('-',i);
    halt;
    end;
    end;
    writeln(s+c*120);
    end.

  • 0
    @ 2013-05-05 14:36:39

    为什么提交不上去

  • 0
    @ 2012-11-29 18:07:21

    简单要死

    var

    a:array[1..100]of integer;

    i,n,s,b,x:integer;

    begin

    for i:=1 to 12 do readln(a[i]);

    for i:=1 to 12 do begin

    s:=300-a[i]+s;

    if s0 then write('-',n)

    else write(s+x*120);

    end.

  • 0
    @ 2012-11-08 09:53:02

    program work;

    var

    a:array[1..12] of integer;

    i,s:integer;

    t:real;

    begin

    s:=0;

    t:=0;

    for i:=1 to 12 do

    begin

    readln(a[i]);

    s:=s+300-a[i];

    if s=100 do

    begin

    s:=s-100;

    t:=t+100;

    end;

    end;

    writeln(t*1.2+s:0:0);

    end.

  • 0
    @ 2012-08-02 10:35:04

    点击这里查看代码

  • 0
    @ 2012-07-27 09:09:15

    我擦,存款一开始我没累加。。。

    var shenyu,cunkuan,i,j,k:longint;

    begin

    for i:=1 to 12 do

    begin

    readln(k);

    if k>300+shenyu then begin writeln(-i);halt;end

    else begin

    cunkuan:=((shenyu+300-k) div 100)+cunkuan;

    shenyu:=(shenyu+300-k) mod 100;

    end;

    end;

    writeln(cunkuan*120+shenyu);

    end.

  • 0
    @ 2012-07-23 20:23:31

    我擦楼下的刷啥屏啊..嫌用户们电脑够好是么.??!!!

    俺是一个语文水平不太好的人,题目挺耐看的,终于看懂啦!!

    "让菜鸟们找回自信的题" 嗯嗯,最下层的说得最好

  • 0
    @ 2010-07-04 09:24:34

    var i,s,t,k:longint;

    a:array [0..1000] of integer;

    begin

    for i:=1 to 12 do readln(a[i]);

    s:=300;

    for t:=1 to 12 do

    begin

    if s-a[t]

  • 0
    @ 2010-04-13 20:49:10

    为啥非得取整数咧!!害我不知刷了多少通过率,晕死~~

    唉~~本来通过率就低!

    program xxx;

    var a:array[1..12] of integer;

    i,j,l,k,c:integer;

    begin

    l:=0;j:=0;c:=0;

    for i:=1 to 12 do begin

    readln(a[i]);

    l:=l+300-a[i];

    if l>=0 then begin

    k:=(l div 100) *100;

    c:=c+k;

    l:=l-k;end

    else begin j:=-i;break;end;end;

    if j0 then writeln(j)

    else writeln(c*1.2+l:0:0);

    end.

  • 0
    @ 2010-04-13 20:19:59

    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.

  • 0
    @ 2010-04-11 19:25:01

    晕。。刚刚用了BREAK,,不知道HALT什么意思。

信息

ID
1096
难度
5
分类
模拟 点击显示
标签
递交数
16002
已通过
5681
通过率
36%
被复制
38
上传者