結果

問題 No.1934 Four Fruits
コンテスト
ユーザー ccc
提出日時 2022-09-01 14:09:15
言語 C#
(.NET 10.0.201)
コンパイル:
dotnet_c
実行:
/usr/bin/dotnet_wrap
結果
WA  
実行時間 -
コード長 749 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 10,760 ms
コンパイル使用メモリ 174,484 KB
実行使用メモリ 198,540 KB
最終ジャッジ日時 2026-05-09 18:10:19
合計ジャッジ時間 10,034 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 4 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (94 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net10.0/main.dll
  main -> /home/judge/data/code/bin/Release/net10.0/publish/

ソースコード

diff #
raw source code

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;


class Program
{
    static void Main()
    {
        var abc = Console.ReadLine().Split().Select(int.Parse).ToList();
        var a = abc[0];
        var b = abc[1];
        var c = abc[2];

        if (a == b && b == c) 
        {
            Console.WriteLine(a);
        }
        else if(a == b || a == c)
        {
            var duplicates = abc.GroupBy(x => x).Where(x => x.Count() > 1).Select(x => x.Key).ToList();
            var result = abc.Except(duplicates).ToList();
            Console.WriteLine(String.Join("",result));
        }
        else if(a != b && b != c)
        {
            Console.WriteLine(3);
        }
    }
}
0