XidianOJ 1141 抢人头

--正文

同样非常直白的题

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;

long x,y,a;

int main(){
    while (scanf("%ld%ld%ld",&x,&y,&a)!= EOF){
        long last = a % (x + y);
        if (last == 0){
            printf("light
");
            continue;
        } 
        if (last > x) {
            printf("light
");
        }
        else {
            printf("wanshen
");
        }
    }
    return 0;
}
原文地址:https://www.cnblogs.com/ToTOrz/p/6084654.html