結果

問題 No.476 正しくない平均
コンテスト
ユーザー aaa aa
提出日時 2025-12-01 13:29:26
言語 C#
(.NET 8.0.404)
結果
WA  
実行時間 -
コード長 745 bytes
コンパイル時間 9,292 ms
コンパイル使用メモリ 172,204 KB
実行使用メモリ 189,752 KB
最終ジャッジ日時 2025-12-01 13:29:39
合計ジャッジ時間 11,585 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 25 MLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (148 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #
raw source code

using System;
public class Program
{
    public static void Main()
    {
        //int num = int.Parse(Console.ReadLine() ?? string.Empty);
        string[] str = (Console.ReadLine() ?? string.Empty).Trim().Split(' ');
        string[] str2 = (Console.ReadLine() ?? string.Empty).Trim().Split(' ');
        //string str = Console.ReadLine() ?? string.Empty;

        long count = 0;
        for(int i = 0; i < str2.Length; i++)
        {
            count += int.Parse(str2[i]);
        }
        Console.WriteLine(count);
        float ans = count / float.Parse(str[0]);
        if(ans == int.Parse(str[1]))
        {
            Console.WriteLine("YES");
        }
        else
        {
            Console.WriteLine("NO");
        }
    }
}
0