Codeforces 835A Key races (水题)

来源:互联网 发布:php选择题答题系统 编辑:程序博客网 时间:2024/06/14 22:02

题目链接

CF 835A

题目大意

分析

代码

#include <bits/stdc++.h>using namespace std;int main(){    int s,v1,v2,t1,t2;    while (scanf("%d%d%d%d%d",&s,&v1,&v2,&t1,&t2)!=EOF)    {        int a=s*v1+2*t1;        int b=s*v2+2*t2;        if (a<b)            printf("First\n");        else if (a>b)            printf("Second\n");        else            printf("Friendship\n");    }    return 0;}
原创粉丝点击