問題一覧 > 通常問題

No.2862 NOT FOUND 404

レベル : / AI推定難易度 : 75 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 179
作問者 : yuusaan / テスター : 寝癖 👑 seekworser
お気に入りにしたユーザー ProblemId : 11111 / 自分の提出
問題文最終更新日: 2026-09-18 21:16:31
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 443 (順位表) の他の問題:

Story

Yu-san hates it when 404 is Not Found. In other words, Yu-san hates digit strings in which 404 cannot be found.

Surely, some of the people about to tackle this problem feel the same way.

Your job is to write, for such people, code that determines whether a given digit string is one where "404 is Not Found".

Problem Statement

You are given a digit string $S$ of length $N$.

Determine whether $S$ satisfies the following condition.

No contiguous substring of $3$ characters in $S$ is 404

Print NotFound if the condition is satisfied, and Found otherwise.

(Note that NotFound must not contain a space, as in Not Found.)

Input

$N$
$S$

Constraints

  • $3\leq N \leq 100$
  • $S$ is a digit string of length $N$

Output

Print the answer on a single line, followed by a newline.

Sample

Sample 1
Input
10
1843404261
Output
Found

The characters from the $5$-th to the $7$-th are 404.

Sample 2
Input
11
45616572034
Output
NotFound

There is no contiguous substring equal to 404.

Sample 3
Input
10
0404404404
Output
Found

There may be multiple contiguous substrings equal to 404. Also, the digit string may start with 0.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。