Untitled

mail@pastecode.io avatar
unknown
abc
2 years ago
1.9 kB
2
Indexable
Never
using System;

namespace _3
{
    class Program
    {
        static void Main(string[] args)
        {
            int hours = int.Parse(Console.ReadLine());
            int min = int.Parse(Console.ReadLine());
            int minutes = min + 15;

            if (minutes >= 60)
            {
                minutes -= 60;
                hours += 1;
                if (hours>=24)
                {
                    hours -= 24;
                    if (minutes>=10)
                    {
                        Console.WriteLine($"{hours}:{minutes}");
                    }
                    else
                    {
                        Console.WriteLine($"{hours}:0{minutes}");
                    }
                }
                else if (hours<24)
                {
                    if (minutes>=10)
                    {
                        Console.WriteLine($"{hours}:{minutes}");
                    }
                    else
                    {
                        Console.WriteLine($"{hours}:0{minutes}");
                    }
                }
                    
            }
                
            
            else if (hours < 24 && hours > 9)
            {
                if (minutes > 9)
                {
                    Console.WriteLine($"{hours}:{minutes}");
                }
                else 
                {
                    Console.WriteLine($"{hours}:0{minutes}");
                }



            }
            else if (hours<10)
            {
                if (minutes > 9)
                {
                    Console.WriteLine($"{hours}:{minutes}");
                }
                else
                {
                    Console.WriteLine($"{hours}:0{minutes}");
                }
                
            }
            
        }
    }
}