結果

問題 No.773 コンテスト
ユーザー chikepluschikeplus
提出日時 2019-01-24 17:41:57
言語 F#
(F# 4.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 504 bytes
コンパイル時間 5,879 ms
コンパイル使用メモリ 158,580 KB
実行使用メモリ 25,088 KB
最終ジャッジ日時 2023-09-20 16:25:58
合計ジャッジ時間 7,755 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
22,872 KB
testcase_01 AC 85 ms
20,924 KB
testcase_02 AC 86 ms
25,088 KB
testcase_03 AC 87 ms
24,972 KB
testcase_04 AC 86 ms
22,988 KB
testcase_05 AC 86 ms
24,996 KB
testcase_06 AC 86 ms
22,928 KB
testcase_07 AC 87 ms
22,992 KB
testcase_08 AC 87 ms
24,972 KB
testcase_09 AC 87 ms
25,024 KB
testcase_10 AC 87 ms
22,972 KB
testcase_11 AC 88 ms
23,028 KB
testcase_12 AC 85 ms
22,964 KB
testcase_13 AC 90 ms
23,000 KB
testcase_14 AC 85 ms
22,868 KB
testcase_15 AC 86 ms
22,960 KB
testcase_16 AC 85 ms
22,968 KB
testcase_17 AC 85 ms
20,928 KB
testcase_18 AC 86 ms
25,012 KB
testcase_19 AC 86 ms
25,084 KB
testcase_20 AC 85 ms
23,164 KB
testcase_21 AC 86 ms
22,964 KB
testcase_22 AC 86 ms
25,016 KB
testcase_23 AC 86 ms
23,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let inputs = System.Console.ReadLine().Split(' ')
let args = [for str in inputs do yield int(str) ]

let rec contains f lt =
  match lt with
  | [] -> false
  | x::xs -> if f x  then  true else contains f xs

let rec filter f lt =
  match lt with
  | [] -> []
  | x::xs -> if f x then  [x] @ (filter f xs) else filter f xs


let contests = [23..25]
let dups = filter (fun  x -> contains (fun y -> y = x ) contests ) [ (List.head args) .. (List.item 1 args) ]

printfn "%i" (contests.Length - dups.Length)
0