結果

問題 No.3493 等比数列の和の素因数
コンテスト
ユーザー 👑 p-adic
提出日時 2026-03-23 20:17:26
言語 C++17(gcc12)
(gcc 12.4.0 + boost 1.89.0)
コンパイル:
g++-12 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 1,009 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,241 ms
コンパイル使用メモリ 202,060 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2026-04-03 20:53:39
合計ジャッジ時間 44,321 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 22 TLE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

// 入力制約確認用
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

#define MAIN main
#define TYPE_OF( VAR ) remove_const<remove_reference<decltype( VAR )>::type >::type
#define UNTIE ios_base::sync_with_stdio( false ); cin.tie( nullptr ) 
#define CEXPR( LL , BOUND , VALUE ) constexpr const LL BOUND = VALUE 
#define CIN( LL , A ) LL A; cin >> A 
#define ASSERT( A , MIN , MAX ) assert( ( MIN ) <= A && A <= ( MAX ) ) 
#define CIN_ASSERT( A , MIN , MAX ) CIN( TYPE_OF( MAX ) , A ); ASSERT( A , MIN , MAX ) 
#define QUIT return 0 
#define COUT( ANSWER ) cout << ( ANSWER ) << "\n"; 
#define RETURN( ANSWER ) COUT( ANSWER ); QUIT 

int MAIN()
{
  UNTIE;
  CEXPR( ll , bound , 1000000000000000000 );
  CIN_ASSERT( N , 0 , bound );
  CIN_ASSERT( P , 2 , bound );
  ll i_max = sqrt( P );
  while( i_max * i_max > P ){
    i_max--;
  }
  while( ( i_max + 1 ) * ( i_max + 1 ) <= P ){
    i_max++;
  }
  for( int i = 2 ; i <= i_max ; ++i ){
    assert( P % i > 0 );
  }
  RETURN( "WA" );
}
0