結果
問題 | No.290 1010 |
ユーザー |
![]() |
提出日時 | 2015-12-06 06:38:54 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 656 bytes |
コンパイル時間 | 2,645 ms |
コンパイル使用メモリ | 108,708 KB |
実行使用メモリ | 20,864 KB |
最終ジャッジ日時 | 2024-09-14 15:10:43 |
合計ジャッジ時間 | 4,502 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; namespace No290 { class MainClass { public static void Main (string[] args) { var n = Convert.ToInt32(Console.ReadLine ()); var s = Console.ReadLine (); if (n == 1) { Console.WriteLine ("NO"); return; } if (n == 2) { if(s.Equals("01")) { Console.WriteLine ("NO"); return; } if(s.Equals("10")) { Console.WriteLine ("NO"); return; } } if (n == 3) { if(s.Equals("010")) { Console.WriteLine ("NO"); return; } if(s.Equals("101")) { Console.WriteLine ("NO"); return; } } Console.WriteLine("YES"); } } }