結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー dyktr_06
提出日時 2023-11-14 12:49:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 256 ms / 2,357 ms
コード長 527 bytes
コンパイル時間 1,642 ms
コンパイル使用メモリ 192,940 KB
最終ジャッジ日時 2025-02-17 21:58:38
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int t; cin >> t;

    while(t--){
        long long n;
        cin >> n;

        int cnt = 0;
        while(n != 1){
            if(cnt % 2 == 0){
                n = (n + 1) / 2;
            }else{
                n = (n + 6) / 7;
            }
            cnt++;
        }
        if(cnt % 2 == 0){
            cout << "sepa" << endl;
        }else{
            cout << "ryota" << endl;
        }
    }
}
0