結果

問題 No.3383 1122-like Number (C++)
コンテスト
ユーザー Rho
提出日時 2025-11-22 01:45:55
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 1,785 ms
コンパイル使用メモリ 195,136 KB
実行使用メモリ 16,836 KB
最終ジャッジ日時 2025-11-22 12:40:15
合計ジャッジ時間 3,566 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import"bits/stdc++.h"
      |  ^~~~~~
main.cpp:2:21: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    2 | using namespace std;main(){int n,i=2,j;cin>>n;vector<int>l(n+1);for(;i<n;i++)if(!l[i])for(j=i;j<=n;j+=i)l[j]+=5*(j/i%i==0)+1;cout<<count(l.begin(),l.end(),4)<<endl;}
      |                     ^~~~

ソースコード

diff #
raw source code

#import"bits/stdc++.h"
using namespace std;main(){int n,i=2,j;cin>>n;vector<int>l(n+1);for(;i<n;i++)if(!l[i])for(j=i;j<=n;j+=i)l[j]+=5*(j/i%i==0)+1;cout<<count(l.begin(),l.end(),4)<<endl;}
0