結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
chike_plus
|
| 提出日時 | 2019-03-28 18:32:31 |
| 言語 | F# (F# 4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 422 bytes |
| コンパイル時間 | 11,782 ms |
| コンパイル使用メモリ | 186,120 KB |
| 実行使用メモリ | 33,808 KB |
| 最終ジャッジ日時 | 2024-10-13 09:03:44 |
| 合計ジャッジ時間 | 13,571 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 2 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (238 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
let ``No.791 うし数列``() =
let s = stdin.ReadLine()
if not (s.StartsWith("1") && s.EndsWith("3"))
then -1
else s
|> Seq.countBy (fun c -> c)
|> fun arg ->
if Seq.length arg > 2
then -1
else arg
|> Seq.find (fun (k , v) -> '3' = k )
|> fun t -> snd(t)
|> stdout.WriteLine
()
``No.791 うし数列``()
chike_plus