結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2015-10-02 00:54:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 248 bytes |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 24,320 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-25 22:38:28 |
| 合計ジャッジ時間 | 1,028 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &k);
| ~~~~~^~~~~~~~~~
ソースコード
#include <cstdio>
#include <initializer_list>
int main()
{
int k;
scanf("%d", &k);
int res=0;
for(int x: {2, 3, 5, 7, 11, 13})
for(int y: {4, 6, 8, 9, 10, 12})
res+=x*y==k;
printf("%.13f\n", res/36.);
}
hogeover30