結果

問題 No.36 素数が嫌い!
ユーザー 184
提出日時 2014-10-10 16:44:35
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 459 bytes
コンパイル時間 661 ms
コンパイル使用メモリ 65,768 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-12-30 08:26:02
合計ジャッジ時間 61,753 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10 WA * 7 TLE * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:22:20: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
   22 |         scanf("%I64d",&n);//%d%d%d%d",&n,&v,&x,&y,&ax,&ay);
      |                ~~~~^  ~~
      |                    |  |
      |                    |  long long int*
      |                    int*
      |                %I64lld
main.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |         scanf("%I64d",&n);//%d%d%d%d",&n,&v,&x,&y,&ax,&ay);
      |         ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#include <queue>

using namespace std;


/*
184 //名前が 184

これだけで解けるとは・・・

*/ 

int main(){
	long long n;
	scanf("%I64d",&n);//%d%d%d%d",&n,&v,&x,&y,&ax,&ay);
	int cnt=0;
	for(int i=2;i*i<=n;i++)if(n%i==0)cnt++;
	
	
	printf(cnt<=2?"NO\n":"YES""\n");
	
	return 0;
} 
0