码迷,mamicode.com
首页 > 其他好文 > 详细

NOIP 2017 复赛(Pascal)准备

时间:2017-10-15 00:30:19      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:sda   col   ted   mil   adl   sub   loading   delphi   程序   

Rating :1500

0/100 (0%)

NOIP2017初赛终于过去啦,迎来的是新一轮的奋斗——复赛。为了激励自己,我便傻逼傻逼的写了一个Rating计算器,反应我每天的刷题记录。程序如下:

var i,j,lt,rating,sub,ac,ce,un,day,en,pu,a,b,c,d,e,jian,bs:real;
var s:ansistring;
begin
  s:=‘-------------------------------------------------------‘;
  writeln(s);
  writeln(‘Input‘);
  write(‘Your Last Rating : ‘);read(lt);
  write(‘Accepted : ‘);read(ac);
  write(‘Compile Error : ‘);read(ce);
  write(‘Unaccepted and un-ce : ‘);read(un);
  writeln(‘What dat is it today?‘);
  writeln(‘1 : Monday‘);
  writeln(‘2 : Tuesday‘);
  writeln(‘3 : Wednesday‘);
  writeln(‘4 : Thursday‘);
  writeln(‘5 : Friday‘);
  writeln(‘6 : Saturday‘);
  writeln(‘7 : Sunday‘);
  write(‘Input a number : ‘);read(day);
  writeln(‘The degree of difficulty of the problems :‘);
  write(‘Five stars : ‘);read(a);
  write(‘Four stars : ‘);read(b);
  write(‘Three stars : ‘);read(c);
  write(‘Two stars : ‘);read(d);
  write(‘One stars : ‘);read(e);
  writeln(‘Finish inputing! Loading...‘);
  writeln(s);
  writeln(‘Result‘);
  writeln(‘Submit : ‘,ac+ce+un:0:0);
  writeln(‘Solve : ‘,a+b+c+d+e:0:0);
  writeln(s);
  writeln(‘Encouragement‘);
  if (ac=0) and (ac+ce+un>0) then
  begin
    writeln(‘No accepted but submit +‘,lt/1000*(ac+un):0:2);
    pu:=lt/100*(ac+un);
  end else begin
  pu:=lt/100*(a*2.5+b*2+c*1.5+d+e*0.5);
  writeln(‘Solve +‘,pu:0:2);
  pu:=pu+lt/100*ac;
  writeln(‘Accepted +‘,lt/100*ac:0:2);end;
  if (1<=day) and (day<=5) then
  begin
    randomize;
    en:=(random(9)+1)/10+1;
    writeln(‘Monday to Friday *‘,en:0:2);
  end else en:=1;
  writeln(‘All +‘,pu*en:0:2);
  writeln(s);
  writeln(‘Punish‘);
  if (ac+ce+un=0) then begin jian:=lt/100*2.5;writeln(‘No Submit -‘,jian);
  end else begin
  jian:=lt/100*ce*0.3;
  writeln(‘Compile Error -‘,jian:0:2);
  jian:=jian+lt/100*un*0.5;
  writeln(‘Unaccepted and un-ce -‘,lt/100*un*0.5:0:2);end;
  if (6<=day) and (day<=7) then
  begin
    randomize;
    bs:=(random(9)+1)/10+1;
    writeln(‘Weekends *‘,bs:0:2);
  end else bs:=1;
  writeln(‘All -‘,bs*jian:0:2);
  writeln(s);
  rating:=lt+en*pu-bs*jian;
  writeln(‘Your finally rating is ‘,rating:0:2);
  writeln(s);
  writeln(‘Please press Enter to return...‘);
  readln;
  readln(s);
end.

运行结果如下(模拟):

技术分享

 

Let‘s fight ! 

 持续更新中...

NOIP 2017 复赛(Pascal)准备

标签:sda   col   ted   mil   adl   sub   loading   delphi   程序   

原文地址:http://www.cnblogs.com/ligen1353055672/p/7668943.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!