結果

問題 No.2201 p@$$w0rd
ユーザー 👑 kakel-sankakel-san
提出日時 2023-02-03 21:26:31
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 645 bytes
コンパイル時間 1,386 ms
コンパイル使用メモリ 65,816 KB
実行使用メモリ 22,616 KB
最終ジャッジ日時 2023-09-15 16:48:40
合計ジャッジ時間 3,758 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,548 KB
testcase_01 AC 51 ms
20,400 KB
testcase_02 AC 51 ms
22,604 KB
testcase_03 AC 50 ms
18,492 KB
testcase_04 WA -
testcase_05 AC 51 ms
20,456 KB
testcase_06 WA -
testcase_07 AC 50 ms
18,600 KB
testcase_08 AC 51 ms
20,464 KB
testcase_09 AC 51 ms
20,560 KB
testcase_10 AC 50 ms
20,552 KB
testcase_11 AC 50 ms
20,464 KB
testcase_12 AC 51 ms
20,452 KB
testcase_13 AC 51 ms
22,572 KB
testcase_14 AC 51 ms
20,460 KB
testcase_15 AC 51 ms
20,572 KB
testcase_16 WA -
testcase_17 AC 51 ms
20,504 KB
testcase_18 AC 51 ms
20,468 KB
testcase_19 AC 51 ms
22,616 KB
testcase_20 AC 51 ms
20,536 KB
testcase_21 AC 51 ms
20,424 KB
testcase_22 AC 51 ms
20,524 KB
testcase_23 AC 52 ms
22,492 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();
        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);
        WriteLine(nums + codes == s.Length ? ans - 1 : ans);
    }
}
0