結果
問題 |
No.312 置換処理
|
ユーザー |
|
提出日時 | 2019-08-12 19:01:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 1,872 ms |
コンパイル使用メモリ | 192,536 KB |
最終ジャッジ日時 | 2025-01-07 11:46:58 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 44 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; for (ll i=3;i*i<=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; }