結果

問題 No.3383 1122-like Number (C++)
コンテスト
ユーザー 259-Momone
提出日時 2025-11-13 03:48:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 3,190 ms
コンパイル使用メモリ 252,068 KB
実行使用メモリ 18,104 KB
最終ジャッジ日時 2025-11-22 12:30:56
合計ジャッジ時間 4,645 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<bits/extc++.h>
      |  ^~~~~~
main.cpp:2:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    2 | main(){
      | ^~~~

ソースコード

diff #
raw source code

#import<bits/extc++.h>
main(){
using namespace std;
int N,p=2,q,a=0;
cin>>N;
vector<int>S(N,1),P;
for(;p<N;++p)if(S[p])for(P.push_back(q=p);q<N;q+=p)S[q]=0;
for(int p:P)for(int q:P)if(q<p&&q<=N/p)for(int r:P)if(r<q&&r<=N/p/q)for(int s:P)if(s<r&&s<=N/p/q/r)++a;else break;else break;else break;
cout<<a<<endl;
}
0