結果
| 問題 | 
                            No.211 素数サイコロと合成数サイコロ (1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Maeda
                         | 
                    
| 提出日時 | 2025-03-10 15:05:14 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 329 bytes | 
| コンパイル時間 | 268 ms | 
| コンパイル使用メモリ | 25,344 KB | 
| 実行使用メモリ | 7,324 KB | 
| 最終ジャッジ日時 | 2025-03-10 15:05:16 | 
| 合計ジャッジ時間 | 1,818 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 33 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d",&n);
      |         ^~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
void main(void){
	int n = 0;
	scanf("%d",&n);
	int primeDice[6] = {2,3,5,7,11,13};
	int synthesisCountDice[6] = {4,6,8,9,10,12};
	double count = 0;
	for(int i = 0;i < 6;i++){
		for(int j = 0 ; j < 6 ; j++){
			if(primeDice[i]*synthesisCountDice[j] == n){
				count++;
			}
		}
	}
	printf("%0.12f",count/36);
}
            
            
            
        
            
Maeda