結果

問題 No.2201 p@$$w0rd
ユーザー 👑 kakel-sankakel-san
提出日時 2023-02-03 21:32:07
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 728 bytes
コンパイル時間 1,637 ms
コンパイル使用メモリ 66,216 KB
実行使用メモリ 22,684 KB
最終ジャッジ日時 2023-09-15 16:59:33
合計ジャッジ時間 4,280 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
20,576 KB
testcase_01 AC 51 ms
20,592 KB
testcase_02 AC 51 ms
18,616 KB
testcase_03 AC 51 ms
20,636 KB
testcase_04 AC 51 ms
20,420 KB
testcase_05 AC 52 ms
20,644 KB
testcase_06 AC 52 ms
20,608 KB
testcase_07 AC 51 ms
20,528 KB
testcase_08 AC 52 ms
22,520 KB
testcase_09 AC 51 ms
20,700 KB
testcase_10 AC 52 ms
20,596 KB
testcase_11 AC 52 ms
22,684 KB
testcase_12 AC 51 ms
22,668 KB
testcase_13 AC 52 ms
20,412 KB
testcase_14 AC 51 ms
20,616 KB
testcase_15 AC 52 ms
20,628 KB
testcase_16 AC 51 ms
22,500 KB
testcase_17 AC 51 ms
22,460 KB
testcase_18 AC 52 ms
20,468 KB
testcase_19 AC 52 ms
22,524 KB
testcase_20 AC 52 ms
20,656 KB
testcase_21 AC 52 ms
22,640 KB
testcase_22 AC 52 ms
20,604 KB
testcase_23 AC 53 ms
20,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;
class Program
{
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var s = ReadLine();
        WriteLine(Pass(s));
    }
    static int Pass(string s)
    {
        var nums = 0;
        var codes = 0;
        foreach (var si in s)
        {
            if (si == 'l' || si == 'o') ++nums;
            if (si == 'a' || si == 's') ++codes;
        }
        var ans = ((1 << nums) - 1) * ((1 << codes) - 1);
        return Math.Max(0, nums + codes == s.Length ? ans - 1 : ans);
    }
}
0