結果
| 問題 | No.395 永遠の17歳 |
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2016-07-09 03:08:41 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 422µs | |
| コード長 | 365 bytes |
| 記録 | |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 80,256 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-10 10:16:08 |
| 合計ジャッジ時間 | 1,652 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(){
int A;
cin >> A;
vector<int> ans = {7,1};
for(int x=2; x<=100; x++){
int tmp = A;
vector<int> hoge;
while(tmp){
hoge.push_back(tmp%x);
tmp /= x;
}
if(hoge == ans){
cout << x << endl;
return 0;
}
}
cout << -1 << endl;
return 0;
}
koyumeishi