結果

問題 No.212 素数サイコロと合成数サイコロ (2)
コンテスト
ユーザー Maeda
提出日時 2025-04-15 10:27:18
言語 C#
(.NET 10.0.201)
コンパイル:
dotnet_c
実行:
/usr/bin/dotnet_wrap
結果
AC  
実行時間 70 ms / 5,000 ms
コード長 880 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 10,787 ms
コンパイル使用メモリ 170,852 KB
実行使用メモリ 193,348 KB
最終ジャッジ日時 2026-07-08 21:05:06
合計ジャッジ時間 12,618 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (83 ミリ秒)。
  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

    class Program
    {
        static void Main(string[] args)
        {
            const int primeSum = 2 + 3 + 5 + 7 + 11 + 13;   //41
            const int synthesisSum = 4+6+8+9+10+12;         //49
            int[] n = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString()));
            decimal product = 1;
            for(int i = 0; i < n[0]; i++)
            {
                product *= primeSum;
            }
            for (int i = 0; i < n[1]; i++)
            {
                product *= synthesisSum;
            }

            if (n[0] + n[1] == 0)
            {
                product = 0;
            }
            else
            {
                for(int i = 0; i < (n[0] + n[1]); i++)
                {
                    product /= 6;
                }
            }

            Console.WriteLine(product);

        }
    }
0