結果
| 問題 | No.908 うしたぷにきあくん文字列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-12 01:20:44 |
| 言語 | Standard ML (MLton 20210117) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 686 bytes |
| 記録 | |
| コンパイル時間 | 2,800 ms |
| コンパイル使用メモリ | 689,536 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-12-12 01:20:49 |
| 合計ジャッジ時間 | 3,784 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
fun readLine () =
valOf (TextIO.inputLine TextIO.stdIn)
fun isUshitapuniaki s =
let
fun isUshitapuniakiAux [] = true
| isUshitapuniakiAux [h] =
Char.isAlpha h
| isUshitapuniakiAux (h1 :: h2 ::tl) =
if Char.isAlpha h1 andalso Char.isSpace h2
then isUshitapuniakiAux tl
else false
in
isUshitapuniakiAux (String.explode (String.substring(s, 0, String.size s - 1)))
end
val () =
let
val s = readLine ()
val ans =
if isUshitapuniaki s then "Yes"
else "No"
in
print (ans ^ "\n")
end