結果
問題 |
No.908 うしたぷにきあくん文字列
|
ユーザー |
|
提出日時 | 2020-06-14 14:47:19 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 397 bytes |
コンパイル時間 | 293 ms |
コンパイル使用メモリ | 19,824 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 01:05:44 |
合計ジャッジ時間 | 969 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
let s = read_line () in let check s = let n = String.length s in let rec loop i = if i = n then true else if i mod 2 = 0 then ( if s.[i] >= 'a' && s.[i] <= 'z' then loop (i + 1) else false ) else ( if s.[i] = ' ' then loop (i + 1) else false ) in loop 0 in print_endline @@ if check s then "Yes" else "No"