Start: Jan, 08, 2019 19:01:00
2018年秋季学期程序设计基础(C语言)期末考试
End: Jan, 08, 2019 21:46:00
Time elapsed:
Time remaining:

Problem_ID: F
Result: Accepted
Time: 6ms
Memory: 1092kB
In contest: 1258

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int main() 
{   
	int sgxq,sgxs,sgfz,zgxq,zgxs,zgfz;
	double sum=0;
	scanf("%d %d %d %d %d %d", &sgxq,&sgxs,&sgfz,&zgxq,&zgxs,&zgfz);
	if(zgxq<sgxq)
		zgxq=zgxq+7;
	sum = sum+(zgxq-sgxq)*24*60;
	if(zgxs<sgxs) 
		sum= sum -24*60+(zgxs+24-sgxs)*60;
	else
		sum = sum +(zgxs-sgxs)*60;
	if(zgfz<sgfz) 
		sum= sum -60+(zgfz+24-sgfz);
	else
		sum = sum +zgfz-sgfz;
	if(sum<=(24*60))
		printf("Y e s\n");
	else
		printf("N o\n");
	return 0;

}