编辑代码

using System;
class Program
{
    public static void Main(string[] args)
    {
        System.Random r = new System.Random(System.DateTime.Now.Millisecond);
        int time = r.Next(1, 60);
        int s = 0;
        int f = 0;
        for(int j = 0; j < 60; j += 4)
        {
            if(s == j) { f = 0;}
            if(time > s && time <= j)
            {
                f = s / 4;
            }
            s = j;
        }
        Console.WriteLine(string.Format("{1}-{0}", f, time));
        //Console.ReadKey();
    }
}