python写的,最后一个测试例子通过不了,大佬能帮忙找下问题所在吗
查看原帖
python写的,最后一个测试例子通过不了,大佬能帮忙找下问题所在吗
605483
F_Suzichen楼主2022/12/13 11:20
a,b=map(int,input().split())
if(a%b==0):
    c=int(a/b)+10
else:
    c=int(a/b)+11
if(c>480):
    t=24*60-(c-480)
    h=t%60
    h1=int(t/60)
else:
    t=480-c
    h=t%60
    h1=int(t/60)
if(h1>10):
    if(h>10):
        print(str(h1)+':'+str(h))
    else:
        print(str(h1)+':'+'0'+str(h))
else:
    if(h>10):
        print('0'+str(h1)+':'+str(h))
    else:
        print('0'+str(h1)+':'+'0'+str(h))

2022/12/13 11:20
加载中...