結果
問題 | No.106 素数が嫌い!2 |
ユーザー |
|
提出日時 | 2017-10-27 17:00:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 22 ms / 5,000 ms |
コード長 | 183 bytes |
コンパイル時間 | 810 ms |
コンパイル使用メモリ | 63,104 KB |
実行使用メモリ | 11,264 KB |
最終ジャッジ日時 | 2024-11-21 20:50:37 |
合計ジャッジ時間 | 1,595 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include <iostream>using namespace std;int a[1<<21],n,k,c;main(){cin>>n>>k;for(int i=2;i<=n;i++){if(!a[i])for(int j=i;j<=n;j+=i)a[j]++;c+=a[i]>=k;}cout<<c<<endl;}