結果

問題 No.970 数列変換マシン
ユーザー ikdikd
提出日時 2020-05-03 16:07:31
言語 F#
(F# 4.0)
結果
AC  
実行時間 621 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 5,570 ms
コンパイル使用メモリ 162,580 KB
実行使用メモリ 38,544 KB
最終ジャッジ日時 2023-09-03 14:52:45
合計ジャッジ時間 15,436 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 587 ms
34,124 KB
testcase_01 AC 591 ms
38,240 KB
testcase_02 AC 597 ms
34,152 KB
testcase_03 AC 583 ms
38,544 KB
testcase_04 AC 621 ms
36,416 KB
testcase_05 AC 589 ms
32,744 KB
testcase_06 AC 566 ms
34,340 KB
testcase_07 AC 580 ms
36,548 KB
testcase_08 AC 590 ms
34,400 KB
testcase_09 AC 97 ms
22,928 KB
testcase_10 AC 96 ms
22,952 KB
testcase_11 AC 101 ms
23,088 KB
testcase_12 AC 98 ms
25,020 KB
testcase_13 AC 97 ms
22,900 KB
testcase_14 AC 108 ms
23,044 KB
testcase_15 AC 84 ms
22,724 KB
testcase_16 AC 85 ms
22,716 KB
testcase_17 AC 83 ms
22,852 KB
testcase_18 AC 84 ms
22,852 KB
testcase_19 AC 84 ms
24,772 KB
testcase_20 AC 84 ms
22,916 KB
testcase_21 AC 85 ms
22,696 KB
testcase_22 AC 85 ms
22,760 KB
testcase_23 AC 85 ms
22,944 KB
testcase_24 AC 85 ms
20,700 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

// Learn more about F# at http://fsharp.org

open System

[<EntryPoint>]
let main argv =
    let n = stdin.ReadLine() |> int
    let y = stdin.ReadLine().Split() |> Array.map int

    let s = y |> Array.sum
    y
    |> Array.map (fun v -> s - v - v * (n - 2))
    |> Array.iter (fun v -> printf "%d " v)
    0 // return an integer exit code
0