結果
問題 |
No.395 永遠の17歳
|
ユーザー |
![]() |
提出日時 | 2019-11-26 16:55:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 354 bytes |
コンパイル時間 | 1,541 ms |
コンパイル使用メモリ | 165,648 KB |
実行使用メモリ | 8,576 KB |
最終ジャッジ日時 | 2024-11-06 22:51:07 |
合計ジャッジ時間 | 4,220 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 TLE * 1 -- * 10 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int a; cin >> a; if(a <= 7){ cout << -1 << endl; return 0; } int ans; for(int i = 8;;++i){ if(a % i != 7) continue; if(i * 1 < a && i * 2 > a){ ans = i; break; } } cout << ans << endl; return 0; }