結果
| 問題 |
No.414 衝動
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-15 22:07:06 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 324 bytes |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 20,736 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-11-17 06:14:50 |
| 合計ジャッジ時間 | 7,576 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 TLE * 3 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%lld",&p);
| ^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>/*掛け算の衝動*/
int main(){
int i,flag=0;
long long p;
scanf("%lld",&p);
if(p%2 == 0){
printf("2 %lld\n",p/2);
flag++;
}
else{
for(i=3;i<p/2;i=i+2){
if(p%i == 0){
printf("%d %lld\n",i,p/i);
flag++;
break;
}
}
}
if(flag == 0) printf("1 %lld\n",p);
return 0;
}