結果

問題 No.395 永遠の17歳
ユーザー purple_jwlpurple_jwl
提出日時 2016-07-15 22:32:03
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 717 bytes
コンパイル時間 1,018 ms
コンパイル使用メモリ 158,700 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-05 00:42:49
合計ジャッジ時間 1,572 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define REP(i, x, n) for (int i = x; i < (int)(n); i++)
#define rep(i, n) REP (i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x.size())
#define popcount(x) __builtin_popcount(x)
#define popcountll(x) __builtin_popcountll(x)
#define uniq(x) x.erase(unique(x.begin(), x.end()), x.end())
#define F first
#define S second
#define mp make_pair
#define eb emplace_back

using namespace std;

typedef long long ll;

const int INF = 1 << 29;

int main() {
    int a;
    cin >> a;
    REP (i, 2, a) {
        if (a / i * 10 + a % i == 17) {
            cout << i << endl;
            return 0;
        }
    }
    cout << "-1" << endl;
}
0