結果

問題 No.18 うーさー暗号
ユーザー mazreanmazrean
提出日時 2019-09-16 01:24:18
言語 F#
(F# 4.0)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 229 bytes
コンパイル時間 3,560 ms
コンパイル使用メモリ 153,516 KB
実行使用メモリ 24,140 KB
最終ジャッジ日時 2023-09-21 04:18:50
合計ジャッジ時間 5,568 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
23,932 KB
testcase_01 AC 58 ms
24,140 KB
testcase_02 AC 56 ms
21,996 KB
testcase_03 AC 57 ms
21,900 KB
testcase_04 AC 56 ms
22,028 KB
testcase_05 AC 57 ms
24,040 KB
testcase_06 AC 56 ms
20,032 KB
testcase_07 AC 57 ms
21,984 KB
testcase_08 AC 56 ms
19,940 KB
testcase_09 AC 57 ms
24,028 KB
testcase_10 AC 56 ms
24,116 KB
testcase_11 AC 56 ms
22,084 KB
testcase_12 AC 56 ms
22,024 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let f i c =
    let cn= (int c)-(i+1)%26
    if cn<65 then (cn+26) |> char |> string
    elif cn>90 then (cn-26) |> char |> string
    else cn |> char |> string
stdin.ReadLine()
|> Seq.mapi f
|> Seq.reduce (+)
|> stdout.WriteLine
0