Start: Jul, 03, 2019 08:38:00
2019年度暑期短学期第七天 助教场
End: Jul, 04, 2019 23:00:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 2378ms
Memory: 2536kB
Author: 2017212212083
In contest: 1292

#include<bits/stdc++.h>

using namespace std;

#define N 100010

int n;
int f[N], vis[N];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    f[0] = 1, f[1] = 1;
    vis[1] = 1;
    for (int i = 2; i <= 45; ++i) {
        f[i] = f[i - 1] + f[i - 2];
        if (f[i] > N) break;
        vis[f[i]] = 1;
    }
    while (cin >> n) {
        cout << (vis[n] ? "mwy win" : "sjy win") << endl;
    }
    return 0;
}