結果

問題 No.395 永遠の17歳
ユーザー 29da164
提出日時 2020-07-27 11:41:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 289 bytes
コンパイル時間 599 ms
コンパイル使用メモリ 72,364 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 20:03:05
合計ジャッジ時間 1,300 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <iomanip>

int main(void){
  using namespace std;
  
  int a,b=0;
  cin >> a;
  for(int i=1;i<=100;i++){
    if((a/i==1)&&(a%i==7)){
      cout << i <<endl;
      break;
    }
    else b++;
  }
  if(b==100)cout << -1 << endl;
  return 0;    
}
0