結果

問題 No.395 永遠の17歳
ユーザー m1025o1184tm1025o1184t
提出日時 2019-11-26 16:55:36
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 354 bytes
コンパイル時間 1,354 ms
コンパイル使用メモリ 161,692 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-04-24 14:27:47
合計ジャッジ時間 3,954 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
10,624 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0