运行正常,但有未得分点,求帮助!

#include
#include
using namespace std;
int main()
{

int s, v,x,y,t,a;
cin>>s>>v;
t = s/v;
if (s%v!=0)
t=t+1;
a=t/60;
if (a>7)
x=31-a;
else
x=7-a;
y=50-t%60;
printf("%02d",x),printf(":"),printf("%02d",y);
return 0;
}

//题目:yyy 的学校要求早上 8 点前到达。学校到 yyy 的家一共有 s(s\le 10000)s(s≤10000) 米,而 yyy 可以以 v(v<10000)v(v<10000) 米每分钟的速度匀速走到学校。此外在上学路上它还要额外花 10 分钟时间进行垃圾分类。请问为了避免迟到 yyy 最晚什么时候出门?输出 HH:MM 的时间格式,不足两位时补零。由于路途遥远, yyy 可能不得不提前一天出发,不过不可能提前超过一天。

输入格式
两个正整数 s,v,意思已经在题目中给定。

输出格式
hh:mm 表示最晚离开家的时间(时:分,必须输出两位,不足两位前面补0)

#include <iostream>
using namespace std;

int main()
{
    int s, v, x, y, t, a;
    cin >> s >> v;
    t = s / v;
    if (s % v != 0)
        t = t + 1;
    t += 10;
    a = 8 * 60 - t;
    if (a < 0)
        a += 24*60;
    x = a / 60;
    y = a % 60;
    printf("%02d:%02d",x, y);
    return 0;
}

如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!

img

y=50-t%60;这一句错了
如果t%60大于50,50-t%60小于0,没有对应处理
建议直接在最开始把t加10再处理