結果

問題 No.112 ややこしい鶴亀算
ユーザー Maeda
提出日時 2025-04-01 16:51:05
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 480 bytes
コンパイル時間 10,418 ms
コンパイル使用メモリ 172,992 KB
実行使用メモリ 189,852 KB
最終ジャッジ日時 2025-04-01 16:51:19
合計ジャッジ時間 11,486 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other WA * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (101 ミリ秒)。
  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)
        {
            int n = int.Parse(Console.ReadLine());
            string[] str = Console.ReadLine().Split(' ');
            int total = 0;
            for(int i = 0; i < str.Length; i++)
            {
                total += int.Parse(str[i]);
            }
            int turtle = (total - (n*2)) / 2;
            int crane = n - turtle;
            Console.WriteLine(turtle + " " + crane);
        }
    }
0