結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー cho435cho435
提出日時 2023-11-28 22:10:26
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 622 bytes
コンパイル時間 4,878 ms
コンパイル使用メモリ 274,168 KB
実行使用メモリ 13,480 KB
最終ジャッジ日時 2023-11-28 22:10:37
合計ジャッジ時間 10,572 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;

int main(){
	int t;
	cin>>t;
	rep(Ti,t){
		ll n;
		cin>>n;
		unordered_map<ll,int> mp;
		auto dfs=[&](auto self,ll x){
			if(x>=n) return 0;
			if(mp.count(x)) return mp.at(x);
			set<int>st;
			st.insert(self(self,x*2));
			st.insert(self(self,x*3));
			st.insert(self(self,x*5));
			st.insert(self(self,x*7));
			rep(i,10){
				if(!st.count(i)) return mp[x]=i;
			}
			return -1;
		};
		int rt=dfs(dfs,1);
		cout<<(rt?"ryota\n":"sepa\n");
	}
}
0