結果
問題 |
No.312 置換処理
|
ユーザー |
![]() |
提出日時 | 2016-01-07 14:00:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 1,000 ms |
コンパイル使用メモリ | 54,972 KB |
実行使用メモリ | 13,760 KB |
最終ジャッジ日時 | 2024-09-19 13:00:02 |
合計ジャッジ時間 | 3,712 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 TLE * 1 -- * 43 |
ソースコード
#include<iostream> using namespace std; int main(void) { long long int i, n, ans; cin >> n; if (n % 3 == 0) { cout << 3 << endl; return 0; } if (n % 4 == 0) { cout << 4 << endl; return 0; } for (i = 5; i <= n; i+=2) { if (n%i == 0) { ans = i; break; } } cout << ans << endl; return 0; }