Advertisement
Pietras286

Obżartuchy

Dec 13th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main(string[] args)
  6.         {
  7.             int t = int.Parse(Console.ReadLine());
  8.             for (int i = 0; i < t; i++)
  9.             {
  10.                 string[] tab = Console.ReadLine().Split(' ');
  11.                 int ilu = int.Parse(tab[0]);
  12.                 double ile = int.Parse(tab[1]);
  13.                 double day = 60 * 60 * 24;
  14.                 double zjedli = 0;
  15.                 for (int j = 0; j < ilu; j++)
  16.                 {
  17.                     zjedli += Math.Floor(day / double.Parse(Console.ReadLine()));
  18.                 }
  19.                 Console.WriteLine(Math.Ceiling(zjedli/ile));
  20.             }
  21.         }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement