結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー dyktr_06dyktr_06
提出日時 2023-11-14 12:49:37
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 286 ms / 2,357 ms
コード長 527 bytes
コンパイル時間 2,807 ms
コンパイル使用メモリ 201,388 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2023-11-21 20:54:27
合計ジャッジ時間 4,527 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 280 ms
6,676 KB
testcase_06 AC 286 ms
6,676 KB
testcase_07 AC 280 ms
6,676 KB
testcase_08 AC 281 ms
6,676 KB
testcase_09 AC 281 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

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