結果
| 問題 | 
                            No.211 素数サイコロと合成数サイコロ (1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Naoki00712
                         | 
                    
| 提出日時 | 2023-06-02 17:41:46 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 431 bytes | 
| コンパイル時間 | 171 ms | 
| コンパイル使用メモリ | 30,080 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-28 15:42:34 | 
| 合計ジャッジ時間 | 1,194 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 33 | 
ソースコード
#include <stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	if (n==0)
	{
		printf("0");
		return 0;
	}
	int dice1[] = { 2,3,5,7,11,13 };
	int dice2[] = { 4,6,8,9,10,12 };
	int count = 0;
	for (int i = 0; i < 6; i++)
	{
		if (n % dice1[i] == 0)
		{
			for (int j = 0; j < 6; j++)
			{
				if (dice1[i] * dice2[j] == n)
				{
					count++;
				}
			}
		}
	}
	double ans = (double)count / 36;
	printf("%.16lf",ans);
	return 0;
}
            
            
            
        
            
Naoki00712