結果
問題 |
No.312 置換処理
|
ユーザー |
![]() |
提出日時 | 2017-05-03 07:13:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 272 bytes |
コンパイル時間 | 1,467 ms |
コンパイル使用メモリ | 166,512 KB |
実行使用メモリ | 13,752 KB |
最終ジャッジ日時 | 2024-09-14 06:59:10 |
合計ジャッジ時間 | 4,948 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 TLE * 1 -- * 43 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:3:22: warning: 'ans' may be used uninitialized [-Wmaybe-uninitialized] 3 | #define p(s) cout<<(s)<<endl | ^ main.cpp:10:13: note: 'ans' was declared here 10 | int ans; | ^~~
ソースコード
#include <bits/stdc++.h> #define REP(i,n,N) for(int i=(n);i<(int)N;i++) #define p(s) cout<<(s)<<endl typedef long long ll; using namespace std; int main(){ ll N; cin>>N; int ans; for(int i=3;i*i<=N;i+=2){ if(N%i==0){ ans=i; break; } } p(ans); return 0; }