結果

問題 No.69 文字を自由に並び替え
コンテスト
ユーザー 大谷祐翔
提出日時 2025-10-30 10:46:05
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 611 bytes
コンパイル時間 8,787 ms
コンパイル使用メモリ 170,496 KB
実行使用メモリ 185,708 KB
最終ジャッジ日時 2025-10-30 10:46:16
合計ジャッジ時間 9,826 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (112 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

class Program
{
    static void Main(string[] args)
    {
        string topWord = Console.ReadLine()!;
        string bottomWord = Console.ReadLine()!;
        int count = 0;

        foreach (char top in topWord)
        {
            foreach (char bottom in bottomWord)
            {
                if (top == bottom)
                {
                    count++;
                    break;
                }
            }
        }

        if (count == topWord.Length)
        {
            Console.WriteLine("Yes");
        }
        else
        {
            Console.WriteLine("No");
        }
    }
}
0