結果

問題 No.211 素数サイコロと合成数サイコロ (1)
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-26 09:21:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 540 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,173 ms
コンパイル使用メモリ 113,540 KB
実行使用メモリ 27,428 KB
最終ジャッジ日時 2025-11-26 09:21:24
合計ジャッジ時間 4,073 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #
raw source code

using System;
class Program
{
    static void Main(string[] args)
    {
        int num = int.Parse(Console.ReadLine()!);
        int count = 0;
        int[] prime = { 2, 3, 5, 7, 11, 13 };
        int[] mix = { 4, 6, 8, 9, 10, 12 };

        for (int i = 0; i < prime.Length; i++)
        {
            for (int j = 0; j < mix.Length; j++)
            {
                if (prime[i] * mix[j] == num)
                {
                    count++;
                }
            }
        }

        Console.WriteLine(count / 36.0);
    }
}
0