結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー Naru820
提出日時 2025-05-07 19:10:22
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 375 bytes
コンパイル時間 3,989 ms
コンパイル使用メモリ 275,048 KB
実行使用メモリ 19,136 KB
最終ジャッジ日時 2025-05-07 19:10:35
合計ジャッジ時間 11,613 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 998244353;

ll t,n;
vector<int> a = {2,3,5,7};
bool solve(ll now){
  if(now > n) return false;
  for(int i = 0; i < 4; i++){
    if(!solve(now * a[i])) return 1;
  }
  return 0;
}
int main(){
  cin >> t;
  while(t--){
    cin >> n;
    cout << (solve(1) ?  "ryota" : "sepa") << endl;
  }
}
0