V_Wii

Untitled

May 17th, 2020
1,440
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program Temp;
  2. var
  3. N:integer;
  4.  
  5. line:string;
  6. values: array of string;
  7. day:integer;
  8. month:integer;
  9. t:real;
  10.  
  11. sum: array [1..12] of real;
  12. days: array [1..12] of integer;
  13. i: integer;
  14. begin
  15.  
  16. readln(N);
  17. for i := 1 to N do
  18. begin
  19. readln(line);
  20. values := line.Split('.',' ');
  21. day := StrToInt(values[0]);
  22. month := StrToInt(values[1]);
  23. t := StrToReal(values[2]);
  24.  
  25. sum[month] += t;
  26. days[month] += 1;
  27. end;
  28.  
  29. for i := 1 to 12 do
  30. writeln(sum[i]/days[i]);
  31. end.
RAW Paste Data