結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
notetonous
|
| 提出日時 | 2016-04-07 01:24:09 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 280 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-04 02:25:14 |
| 合計ジャッジ時間 | 2,315 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 WA * 8 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld",&N);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
long long int i,j,N,x;
int count=0;
scanf("%lld",&N);
x=N;
for(i=2;i*i<=N;i++){
while(1){
if(x%i!=0)break;
x=x/i;
count++;
}
if(count>2)break;
}
if(count>2)printf("YES\n");
else printf("NO\n");
return 0;
}
notetonous