結果

問題 No.671 1000000007
ユーザー karahubuki
提出日時 2018-05-08 20:54:52
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 217 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 55,116 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-28 02:31:13
合計ジャッジ時間 974 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main()
{
  string n;
  cin >> n;
  int ans;
  int i=1;

  while(n[i]!='7')i++;

  if(i>8)cout << i-9 << endl;
  else cout << 9-i << endl;

  return 0;
}
0