結果
| 問題 |
No.414 衝動
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-28 16:59:27 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 402 bytes |
| コンパイル時間 | 620 ms |
| コンパイル使用メモリ | 26,752 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-28 16:59:29 |
| 合計ジャッジ時間 | 1,976 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 2 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%lld",&n);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
void main(void) {
long long int n = 0;
scanf("%lld",&n);
bool flg = false;
double plus = sqrt(n);
for(long long int i = 2 ; i < plus ; i++){
if(n%i == 0 && n/i > 1){
printf("%lld %lld",i , n/i);
flg = true;
break;
}
}
if(!flg){
printf("1 %lld",n);
}
}
Maeda