結果

問題 No.2201 p@$$w0rd
ユーザー mobchan
提出日時 2023-04-29 17:09:58
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 12,053 ms
コンパイル使用メモリ 169,816 KB
実行使用メモリ 187,364 KB
最終ジャッジ日時 2024-11-18 11:46:57
合計ジャッジ時間 14,179 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (98 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        var S = Console.ReadLine();

        var suuji = S.Where(x => x == 'l').Count();
        suuji += S.Where(x => x == 'o').Count();

        var kigou = S.Where(x => x == 'a').Count();
        kigou += S.Where(x => x == 's').Count();

        var ans = (Math.Pow(2, suuji) - 1) * (Math.Pow(2, kigou) - 1);

        if (suuji > 0 && kigou > 0 && suuji + kigou == 8) ans--;
        Console.WriteLine(ans);
    }
}
0