ZJANS

b884. 電腦教室的傑克

Easy Last Update: 2026/01/20
cpp

解法一

✅ 完整代碼

評分結果(參考) : AC (1ms, 340KB)

#include<bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int n;
    cin >> n;
    
    for(int i=0; i<n; i++){
        int x, y, r=0;
        cin >> x >> y;
        
        r = sqrt(x + y);
        int yee = 100-x-y;
        
        if(0<yee && yee<=30) cout << "sad!\n";
        else if(30<yee && yee<=60) cout << "hmm~~\n";
        else if(60<yee && yee<100) cout << "Happyyummy\n";
        else cout << "evil!!\n";
    }
    
    return 0;
}