結果
| 問題 |
No.671 1000000007
|
| コンテスト | |
| ユーザー |
練習卿
|
| 提出日時 | 2018-04-13 22:31:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 468 bytes |
| コンパイル時間 | 571 ms |
| コンパイル使用メモリ | 70,652 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 21:46:05 |
| 合計ジャッジ時間 | 1,102 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
#include <iostream>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <stdio.h>
#include <string>
#include <string.h>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
int main (void)
{
string a;
cin >> a;
int co = 0;
for (int i = 1; i < 100; i++)
{
if (a.substr(i,1) == "7")
{
break;
}
co += 1;
}
if (co >= 8)
{
cout << co - 8 << endl;
}
else
{
cout << 8 - co << endl;
}
}
練習卿