結果

問題 No.558 575検出するやつ
ユーザー kachipankachipan
提出日時 2023-06-30 09:13:29
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 29,696 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 22:10:56
合計ジャッジ時間 1,114 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main()
{
	char str[101] = "";

	scanf("%s", str);

	for (int i = 0;str[i] != '\0';i++)
	{
		if (str[i] == '5')
		{
			if (str[i+1] == '7')
			{
				if (str[i+2] == '5')
				{
					printf("YES\n");
					return 0;
				}
				else
				{
					i += 2;
				}
			}
			else
			{
				i++;
			}
		}
	}

	printf("NO\n");

	return 0;
}
0