結果
| 問題 | 
                            No.2551 2, 3, 5, 7 Game
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-11-28 22:20:22 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 538 bytes | 
| コンパイル時間 | 4,476 ms | 
| コンパイル使用メモリ | 261,444 KB | 
| 最終ジャッジ日時 | 2025-02-18 02:17:35 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 TLE * 1 -- * 4 | 
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using mint = atcoder::modint998244353;
ll n;
unordered_map<ll,int> mp;
int dfs(ll x){
	if(x>=n) return 1;
	if(mp.count(x)) return mp.at(x);
	set<int>st={0,1,2,3,4};
	st.erase(dfs(x*2));
	st.erase(dfs(x*3));
	st.erase(dfs(x*5));
	st.erase(dfs(x*7));
	return mp[x]=*st.begin();
}
int main(){
	int t;
	cin>>t;
	rep(Ti,t){
		cin>>n;
		mp.clear();
		int rt=dfs(1);
		cout<<(rt?"sepa\n":"ryota\n");
	}
}