結果
| 問題 |
No.312 置換処理
|
| コンテスト | |
| ユーザー |
feybk
|
| 提出日時 | 2017-06-09 16:31:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 312 bytes |
| コンパイル時間 | 609 ms |
| コンパイル使用メモリ | 60,360 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 14:32:06 |
| 合計ジャッジ時間 | 1,892 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 44 WA * 1 |
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
typedef long long ll;
int main(){
ll N;
cin >> N;
for(size_t i=3; i<=sqrt(N); i++){
if(N % i == 0){
cout << i << endl;
return 0;
}
}
if(N % 2 == 0){
cout << N/2 << endl;
}else{
cout << N << endl;
}
return 0;
}
feybk