标签:c
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; double sumg,sume; int ga1,gb1,ga2,gb2,ea1,eb1,ea2,eb2; int main () { while (scanf("%d%d%d%d",&ga1,&gb1,&ga2,&gb2)!=EOF) { sumg = (double)(ga1+gb1)/2+(double)(ga2+gb2)/2; scanf ("%d%d%d%d",&ea1,&eb1,&ea2,&eb2); sume = (double)(ea1+eb1)/2+(double)(ea2+eb2)/2; if (sumg > sume) printf ("Gunnar\n"); else if (sumg < sume) printf ("Emma\n"); else printf ("Tie\n"); } return 0; }
标签:c
原文地址:http://blog.csdn.net/xky1306102chenhong/article/details/45290389