提出 #29304293


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
int main(){
  long long X, S;
  queue<long long> Q;
  cin >> X;
  Q.push(X);
  S = 1;
  while(! Q.empty()){
    if (Q.front() < 5){
      S = (S * (Q.front() % 998244353)) % 998244353;
    }
    else{
      Q.push(Q.front()/2);
      Q.push((Q.front() + 1)/2);
    }
    Q.pop();
  }
  cout << S << endl;
}

提出情報

提出日時
問題 A - Floor, Ceil - Decomposition
ユーザ nullpoint
言語 C++ (GCC 9.2.1)
得点 0
コード長 371 Byte
結果 TLE
実行時間 2248 ms
メモリ 1580540 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 0 / 300
結果
AC × 3
AC × 13
TLE × 9
セット名 テストケース
Sample 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt
All 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt, 02_small_01.txt, 02_small_02.txt, 02_small_03.txt, 02_small_04.txt, 02_small_05.txt, 02_small_06.txt, 02_small_07.txt, 02_small_08.txt, 02_small_09.txt, 02_small_10.txt, 03_rand_01.txt, 03_rand_02.txt, 03_rand_03.txt, 03_rand_04.txt, 03_rand_05.txt, 04_handmade_01.txt, 04_handmade_02.txt, 04_handmade_03.txt, 04_handmade_04.txt
ケース名 結果 実行時間 メモリ
01_sample_01.txt AC 2 ms 3596 KiB
01_sample_02.txt AC 2 ms 3520 KiB
01_sample_03.txt AC 3 ms 3564 KiB
02_small_01.txt AC 2 ms 3516 KiB
02_small_02.txt AC 1 ms 3572 KiB
02_small_03.txt AC 3 ms 3464 KiB
02_small_04.txt AC 2 ms 3468 KiB
02_small_05.txt AC 2 ms 3468 KiB
02_small_06.txt AC 3 ms 3516 KiB
02_small_07.txt AC 3 ms 3436 KiB
02_small_08.txt AC 2 ms 3472 KiB
02_small_09.txt AC 3 ms 3500 KiB
02_small_10.txt AC 3 ms 3464 KiB
03_rand_01.txt TLE 2248 ms 1576736 KiB
03_rand_02.txt TLE 2248 ms 1576024 KiB
03_rand_03.txt TLE 2248 ms 1578168 KiB
03_rand_04.txt TLE 2248 ms 1576504 KiB
03_rand_05.txt TLE 2248 ms 1580540 KiB
04_handmade_01.txt TLE 2248 ms 1579184 KiB
04_handmade_02.txt TLE 2248 ms 1578000 KiB
04_handmade_03.txt TLE 2248 ms 1579488 KiB
04_handmade_04.txt TLE 2247 ms 1580464 KiB