結果
問題 |
No.908 うしたぷにきあくん文字列
|
ユーザー |
|
提出日時 | 2022-01-11 17:12:59 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 508 bytes |
コンパイル時間 | 2,266 ms |
コンパイル使用メモリ | 74,192 KB |
実行使用メモリ | 54,428 KB |
最終ジャッジ日時 | 2024-11-14 11:40:47 |
合計ジャッジ時間 | 5,576 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); int i = 0; for ( ; i < s.length(); i++) { String c = String.valueOf(s.charAt(i)); if (i % 2 == 0) { if (c.equals(" ")) { break; } } if (i % 2 == 1) { if (!(c.equals(" "))) { break; } } } if (i == s.length()) { System.out.println("Yes"); } else { System.out.println("No"); } } }