3 条题解

  • 1
    @ 2024-11-23 13:44:25

    • 0
      @ 2024-12-8 15:53:23
      #include <math.h>
      #include <stdio.h>
      int main() {
          int s, v;
          scanf("%d %d", &s, &v);
          int start = (int)((24 + 8) * 60 - 10 - ceil(1.0 * s / v)) % (24 * 60);
          double m = start / 60, n = start % 60;
          printf("%02.0lf:%02.0lf", m, n);
          return 0;
      }
      
      • 0
        @ 2024-11-18 18:54:03
        #include <stdio.h>
        
        void calculateTime(int s, int v) {
            double t1 = (double)s / v;
            int c = t1;
            double b = t1 - c;
        
            int totalMinutes = (int)(t1 + 10);
            int hours = totalMinutes / 60;
            int minutes = totalMinutes % 60;
            if (hours <= 7)
                printf("%02d:", 7 - hours);
            else
                printf("%02d:", 24 - (hours - 7));
            if (b != 0) {
                printf("%02d", 59 - minutes);
            } else
                printf("%02d", 60 - minutes);
        }
        
        int main() {
            int s, v;
            scanf("%d %d", &s, &v);
            calculateTime(s, v);
            return 0;
        }
        
        • 1

        信息

        ID
        41
        时间
        1000ms
        内存
        512MiB
        难度
        7
        标签
        递交数
        201
        已通过
        49
        上传者