반응형
SMALL
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Study11
{
class App
{
//생성자
public App()
{
//[BOJ] 10173 니모를 찾아서
string[] arr = {
"Marlin names this last egg Nemo, a name that Coral liked.",
"While attempting to save nemo, Marlin meets Dory,",
"a good-hearted and optimistic regal blue tang with short-term memory loss.",
"Upon leaving the East Australian Current,(888*%$^&%0928375)Marlin and Dory",
"NEMO leaves for school and Marlin watches NeMo swim away."
};
//여기서부터 작성 하세요
for (int i =0; i < arr.Length; i++)
{
if (arr[i].Contains("nemo"))
{
Console.WriteLine("Found");
}
else if (arr[i].Contains("Nemo"))
{
Console.WriteLine("Found");
}
else if (arr[i].Contains("NeMo"))
{
Console.WriteLine("Found");
}
else
Console.WriteLine("Missing");
}
//출력
//Found
//Found
//Missing
//Missing
//Found
}
}
}
결과창

반응형
LIST
'Algorithm > BOJ' 카테고리의 다른 글
| [알고스팟] 록 페스티벌 C# 문제 풀이 (0) | 2023.01.17 |
|---|---|
| [BOJ] 1181 단어 정렬 C# 이용 (1) | 2023.01.12 |
| [BOJ] 4458 첫 글자를 대문자로 C# 이용 (1) | 2023.01.12 |
| [BOJ] 2711 오타맨 고창영 (0) | 2023.01.12 |
| [BOJ] 9086 문자열 (1) | 2023.01.12 |