結果

問題 No.2551 2, 3, 5, 7 Game
ユーザー tnakao0123tnakao0123
提出日時 2023-11-27 17:29:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 41 ms / 2,357 ms
コード長 631 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 40,640 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2023-11-27 17:29:08
合計ジャッジ時間 2,184 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 2551.cc:  No.2551 2, 3, 5, 7 Game - yukicoder
 */

#include<cstdio>
#include<algorithm>

using namespace std;

/* constant */

const long long LINF = 1LL << 60;

/* typedef */

typedef long long ll;

/* global variables */

/* subroutines */

/* main */

int main() {
  int tn;
  scanf("%d", &tn);

  while (tn--) {
    ll n;
    scanf("%lld", &n);

    ll l = n, r = LINF;
    while (l >= 2) {
      ll f = (l + 1) / 2;
      r = l, l = f;
      if (l <= 1) { puts("ryota"); break; }

      ll g = (l + 6) / 7;
      r = l, l = g;
      if (l <= 1) { puts("sepa"); break; }
    }
  }

  return 0;
}
0