結果

問題 No.476 正しくない平均
ユーザー fujitafujita
提出日時 2023-05-10 09:18:45
言語 C#
(.NET 8.0.203)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 707 bytes
コンパイル時間 18,758 ms
コンパイル使用メモリ 147,872 KB
実行使用メモリ 163,904 KB
最終ジャッジ日時 2023-08-17 16:35:49
合計ジャッジ時間 20,550 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
28,296 KB
testcase_01 AC 47 ms
28,396 KB
testcase_02 AC 48 ms
28,408 KB
testcase_03 AC 48 ms
28,224 KB
testcase_04 AC 48 ms
28,300 KB
testcase_05 AC 48 ms
28,252 KB
testcase_06 AC 47 ms
28,488 KB
testcase_07 AC 47 ms
28,300 KB
testcase_08 AC 47 ms
28,424 KB
testcase_09 AC 47 ms
28,472 KB
testcase_10 AC 47 ms
28,296 KB
testcase_11 AC 48 ms
28,396 KB
testcase_12 AC 47 ms
28,440 KB
testcase_13 AC 47 ms
28,288 KB
testcase_14 AC 48 ms
28,424 KB
testcase_15 AC 47 ms
28,304 KB
testcase_16 AC 48 ms
28,356 KB
testcase_17 AC 47 ms
28,356 KB
testcase_18 AC 47 ms
28,484 KB
testcase_19 AC 48 ms
28,408 KB
testcase_20 AC 47 ms
28,580 KB
testcase_21 AC 48 ms
30,504 KB
testcase_22 AC 48 ms
30,284 KB
testcase_23 AC 47 ms
28,264 KB
testcase_24 AC 48 ms
30,264 KB
testcase_25 AC 47 ms
28,272 KB
testcase_26 AC 48 ms
28,300 KB
testcase_27 AC 48 ms
28,328 KB
testcase_28 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 155 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {

        static void Main(string[] args)
        {
            
            var str = Console.ReadLine().Split(" ");
            var n = int.Parse(str[0]);
            var a = int.Parse(str[1]);

            var str2 = Console.ReadLine().Split(" ");
            long x = 0 , sum = 0;

            for(int i = 0; i < str2.Length; i++)
            {
                x = int.Parse(str2[i]);
                sum += x;
            }
            if(sum / n == a && sum % n == 0)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}
0