結果
| 問題 |
No.290 1010
|
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2021-04-22 07:39:09 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 5,000 ms |
| コード長 | 569 bytes |
| コンパイル時間 | 701 ms |
| コンパイル使用メモリ | 104,748 KB |
| 実行使用メモリ | 29,756 KB |
| 最終ジャッジ日時 | 2024-07-04 06:15:47 |
| 合計ジャッジ時間 | 2,091 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Hello
{
static void Main()
{
Console.ReadLine();
var s = Console.ReadLine().Trim();
getAns(s);
}
static bool calc(string s, string t) => s.IndexOf(t) != -1;
static void getAns(string s)
{
if (calc(s, "00")) { Console.WriteLine("YES"); return; }
if (calc(s, "11")) { Console.WriteLine("YES"); return; }
if (calc(s, "1010")) { Console.WriteLine("YES"); return; }
if (calc(s, "0101")) { Console.WriteLine("YES"); return; }
Console.WriteLine("NO");
}
}
bluemegane