1 solutions

  • 0
    @ 2025-11-5 17:19:30

    C++ :

    #include<stdio.h>
    
    int main()
    {
        int n,v,t,temp,ans;
        double tt;
    
        while( scanf("%d", &n) && n )
        {
            ans=1<<30;
            while(n--)
            {
                scanf("%d%d", &v, &t);
                if( t>=0 )
                {
                    tt = (4.5*3600/v);//计算到达终点所需时间
                    if( tt-(int)tt>0 ) tt++;//秒数应取整
                    temp=tt+t;//计算到达时间
                    if( ans>temp ) ans=temp;
                }
            }
            printf("%d\n",ans);
        }
        return 0;
    }
    
    • 1

    Information

    ID
    18299
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By