fork(5) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string[] wschod = Console.ReadLine().Split(":");
  8. string[] zachod = Console.ReadLine().Split(":");
  9. string[] godz = Console.ReadLine().Split(":");
  10. int h = int.Parse(godz[0]);
  11. int m = int.Parse(godz[1]);
  12. while( 1 != 0 )
  13. {
  14. m++;
  15. if( m == 60 )
  16. {
  17. m = 0;
  18. h++;
  19. if( h == 24 ) h = 0;
  20. }
  21. if( h == int.Parse(wschod[0]) && m == int.Parse(wschod[1]) )
  22. {
  23. Console.WriteLine("noc");
  24. break;
  25. }
  26. if( h == int.Parse(zachod[0]) && m == int.Parse(zachod[1]) )
  27. {
  28. Console.WriteLine("dzien");
  29. break;
  30. }
  31. }
  32. }
  33. }
Success #stdin #stdout 0.03s 16212KB
stdin
05:20
20:15
05:20
stdout
noc