結果
| 問題 |
No.2201 p@$$w0rd
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-03 21:26:31 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 645 bytes |
| コンパイル時間 | 2,501 ms |
| コンパイル使用メモリ | 105,088 KB |
| 実行使用メモリ | 17,792 KB |
| 最終ジャッジ日時 | 2024-07-02 19:08:36 |
| 合計ジャッジ時間 | 2,476 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 WA * 3 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}