結果

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

テストケース

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

ソースコード

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 + 1) / 2 / 7;
      r = l, l = g;
      if (l <= 1) { puts("sepa"); break; }
    }
  }

  return 0;
}
0