View Code of Problem 104

#include<stdio.h>
int main()
{
	int n,v1,v2,t;
	while(scanf("%d %d %d %d",&n,&v1,&v2,&t)!=EOF)
	{
		if(v1*t+n==v2*t)
			printf("%d\n",t);
		else printf("NO\n");
	}
}

Double click to view unformatted code.


Back to problem 104