結果

問題 No.18 うーさー暗号
ユーザー hum_ophum_op
提出日時 2016-04-05 11:09:02
言語 F#
(F# 4.0)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 378 bytes
コンパイル時間 3,573 ms
コンパイル使用メモリ 160,856 KB
実行使用メモリ 24,664 KB
最終ジャッジ日時 2023-09-21 12:11:44
合計ジャッジ時間 5,575 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
24,664 KB
testcase_01 AC 76 ms
24,592 KB
testcase_02 AC 76 ms
22,536 KB
testcase_03 AC 78 ms
22,568 KB
testcase_04 AC 77 ms
22,704 KB
testcase_05 AC 77 ms
20,560 KB
testcase_06 AC 78 ms
24,596 KB
testcase_07 AC 80 ms
22,488 KB
testcase_08 AC 80 ms
22,696 KB
testcase_09 AC 82 ms
22,580 KB
testcase_10 AC 76 ms
24,596 KB
testcase_11 AC 77 ms
24,600 KB
testcase_12 AC 81 ms
22,552 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let No18 () =
    let S = Console.ReadLine()
    let deciper (C:char) (N:int) =
        let C = int C - int 'A'
        let N = N % 26
        let C = C - N
        if C < 0 then
            char (int 'Z' + C + 1)
        else
            char (int 'A' + C)

    for i in 1..S.Length do
        printf "%c" (deciper S.[i-1] i)
    done
    printfn ""
    ()
No18 ()
0