結果
| 問題 |
No.1904 Never giving up!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-23 21:09:35 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,151 bytes |
| コンパイル時間 | 15,220 ms |
| コンパイル使用メモリ | 167,920 KB |
| 実行使用メモリ | 184,228 KB |
| 最終ジャッジ日時 | 2024-11-07 14:30:22 |
| 合計ジャッジ時間 | 12,839 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 2 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (119 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
//using static CompLib.CompLib;
//using DataStructure;
namespace atcoder
{
class Program
{
const int intMax = 1000000000;
const long longMax = 2000000000000000000;
static void Main(string[] args)
{
int N = int.Parse(Console.ReadLine());
var A = Console.ReadLine().Split().Select(int.Parse).ToArray();
long all = 0;
for (int i = 1; i <= N; i++)
{
if (i == 1) all = i;
else all *= i;
}
var list = new long[N + 1];
for (int i = 0; i < N; i++)
{
list[A[i]]++;
}
long p = 1;
for (int i = 0; i < N; i++)
{
if (list[i] > 0)
{
for (long j = 1; j <= list[i]; j++)
{
p *= j;
}
}
}
Console.WriteLine(all / p);
}
}
}