結果
| 問題 |
No.312 置換処理
|
| コンテスト | |
| ユーザー |
notetonous
|
| 提出日時 | 2016-04-03 01:26:52 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 322 bytes |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 23,296 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-02 12:32:44 |
| 合計ジャッジ時間 | 1,441 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 39 WA * 6 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%lld",&n);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <math.h>
int main(){
long long int n;
long long int i;
long long int sn;
long long int x;
scanf("%lld",&n);
sn=sqrt(n);
for(i=1;i<=sn;i++){
if(n%i==0){
x=n/i;
if(i>2){
printf("%lld\n",i);
return 0;
}
}
}
printf("%lld\n",n);
return 0;
}
notetonous