結果
問題 |
No.908 うしたぷにきあくん文字列
|
ユーザー |
![]() |
提出日時 | 2019-10-19 20:10:05 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 785 ms |
コンパイル使用メモリ | 103,680 KB |
実行使用メモリ | 17,152 KB |
最終ジャッジ日時 | 2024-06-27 16:11:55 |
合計ジャッジ時間 | 2,185 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
コンパイルメッセージ
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() { var s = Console.ReadLine().Trim(); Console.WriteLine(check(s) ? "Yes" : "No"); } static bool check(string s) { for (int i = 0; i < s.Length; i++) if ((i % 2 == 0 && s[i] == ' ') | (i % 2 == 1 && s[i] != ' ')) return false; return true; } }