結果
| 問題 | No.395 永遠の17歳 |
| コンテスト | |
| ユーザー |
language_43
|
| 提出日時 | 2016-09-12 21:04:33 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 508 bytes |
| 記録 | |
| コンパイル時間 | 736 ms |
| コンパイル使用メモリ | 92,296 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-20 18:01:33 |
| 合計ジャッジ時間 | 1,210 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
# include <iostream>
# include <cstring>
# include <string>
# include <vector>
# include <cmath>
# include <sstream>
# include <iomanip>
# include <algorithm>
using namespace std;
# define repl(i, a, b) for(int i=(int)(a);i<(int)(b);i++)
# define rep(i, n) repl(i, 0, n)
typedef long long ll;
int main(){
int A;
cin >> A;
if(A == 17){
cout << 10 << endl;
return 0;
}
for(int i=1;i<A;i++){
if(A / i == 1 && A % i == 7){
cout << i << endl;
return 0;
}
}
cout << -1 << endl;
return 0;
}
language_43