Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace spoj
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12.  
  13. {
  14. int t = int.Parse(Console.ReadLine());
  15. for ( int i = 0; i<t; i++)
  16. {
  17. string[] tab = Console.ReadLine().Split(' ');
  18. int ilu = int.Parse(tab[0]);
  19. double ile = int.Parse(tab[1]);
  20. double day = 60 * 60 * 24;
  21. double zjedli = 0;
  22. for (int j = 0; j < ilu; j++)
  23. {
  24. zjedli += Math.Floor(day / double.Parse(Console.ReadLine()));
  25. }
  26. Console.WriteLine(Math.Ceiling(zjedli / ile));
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement