結果

問題 No.713 素数の和
ユーザー むらためむらため
提出日時 2018-12-18 02:42:17
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 7,481 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 21,120 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-25 07:40:05
合計ジャッジ時間 585 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,816 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 0 ms
6,944 KB
testcase_04 AC 0 ms
6,940 KB
testcase_05 AC 0 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 0 ms
6,944 KB
testcase_08 AC 1 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:106:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  106 |   scanf("%d", &n);
      |   ~~~~~^~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
int n;
const int answers[] = {
    0,     0,     2,     5,     5,     10,    10,    17,    17,    17,
    17,    28,    28,    41,    41,    41,    41,    58,    58,    77,
    77,    77,    77,    100,   100,   100,   100,   100,   100,   129,
    129,   160,   160,   160,   160,   160,   160,   197,   197,   197,
    197,   238,   238,   281,   281,   281,   281,   328,   328,   328,
    328,   328,   328,   381,   381,   381,   381,   381,   381,   440,
    440,   501,   501,   501,   501,   501,   501,   568,   568,   568,
    568,   639,   639,   712,   712,   712,   712,   712,   712,   791,
    791,   791,   791,   874,   874,   874,   874,   874,   874,   963,
    963,   963,   963,   963,   963,   963,   963,   1060,  1060,  1060,
    1060,  1161,  1161,  1264,  1264,  1264,  1264,  1371,  1371,  1480,
    1480,  1480,  1480,  1593,  1593,  1593,  1593,  1593,  1593,  1593,
    1593,  1593,  1593,  1593,  1593,  1593,  1593,  1720,  1720,  1720,
    1720,  1851,  1851,  1851,  1851,  1851,  1851,  1988,  1988,  2127,
    2127,  2127,  2127,  2127,  2127,  2127,  2127,  2127,  2127,  2276,
    2276,  2427,  2427,  2427,  2427,  2427,  2427,  2584,  2584,  2584,
    2584,  2584,  2584,  2747,  2747,  2747,  2747,  2914,  2914,  2914,
    2914,  2914,  2914,  3087,  3087,  3087,  3087,  3087,  3087,  3266,
    3266,  3447,  3447,  3447,  3447,  3447,  3447,  3447,  3447,  3447,
    3447,  3638,  3638,  3831,  3831,  3831,  3831,  4028,  4028,  4227,
    4227,  4227,  4227,  4227,  4227,  4227,  4227,  4227,  4227,  4227,
    4227,  4438,  4438,  4438,  4438,  4438,  4438,  4438,  4438,  4438,
    4438,  4438,  4438,  4661,  4661,  4661,  4661,  4888,  4888,  5117,
    5117,  5117,  5117,  5350,  5350,  5350,  5350,  5350,  5350,  5589,
    5589,  5830,  5830,  5830,  5830,  5830,  5830,  5830,  5830,  5830,
    5830,  6081,  6081,  6081,  6081,  6081,  6081,  6338,  6338,  6338,
    6338,  6338,  6338,  6601,  6601,  6601,  6601,  6601,  6601,  6870,
    6870,  7141,  7141,  7141,  7141,  7141,  7141,  7418,  7418,  7418,
    7418,  7699,  7699,  7982,  7982,  7982,  7982,  7982,  7982,  7982,
    7982,  7982,  7982,  8275,  8275,  8275,  8275,  8275,  8275,  8275,
    8275,  8275,  8275,  8275,  8275,  8275,  8275,  8582,  8582,  8582,
    8582,  8893,  8893,  9206,  9206,  9206,  9206,  9523,  9523,  9523,
    9523,  9523,  9523,  9523,  9523,  9523,  9523,  9523,  9523,  9523,
    9523,  9854,  9854,  9854,  9854,  9854,  9854,  10191, 10191, 10191,
    10191, 10191, 10191, 10191, 10191, 10191, 10191, 10538, 10538, 10887,
    10887, 10887, 10887, 11240, 11240, 11240, 11240, 11240, 11240, 11599,
    11599, 11599, 11599, 11599, 11599, 11599, 11599, 11966, 11966, 11966,
    11966, 11966, 11966, 12339, 12339, 12339, 12339, 12339, 12339, 12718,
    12718, 12718, 12718, 13101, 13101, 13101, 13101, 13101, 13101, 13490,
    13490, 13490, 13490, 13490, 13490, 13490, 13490, 13887, 13887, 13887,
    13887, 14288, 14288, 14288, 14288, 14288, 14288, 14288, 14288, 14697,
    14697, 14697, 14697, 14697, 14697, 14697, 14697, 14697, 14697, 15116,
    15116, 15537, 15537, 15537, 15537, 15537, 15537, 15537, 15537, 15537,
    15537, 15968, 15968, 16401, 16401, 16401, 16401, 16401, 16401, 16840,
    16840, 16840, 16840, 17283, 17283, 17283, 17283, 17283, 17283, 17732,
    17732, 17732, 17732, 17732, 17732, 17732, 17732, 18189, 18189, 18189,
    18189, 18650, 18650, 19113, 19113, 19113, 19113, 19580, 19580, 19580,
    19580, 19580, 19580, 19580, 19580, 19580, 19580, 19580, 19580, 20059,
    20059, 20059, 20059, 20059, 20059, 20059, 20059, 20546, 20546, 20546,
    20546, 21037, 21037, 21037, 21037, 21037, 21037, 21037, 21037, 21536,
    21536, 21536, 21536, 22039, 22039, 22039, 22039, 22039, 22039, 22548,
    22548, 22548, 22548, 22548, 22548, 22548, 22548, 22548, 22548, 22548,
    22548, 23069, 23069, 23592, 23592, 23592, 23592, 23592, 23592, 23592,
    23592, 23592, 23592, 23592, 23592, 23592, 23592, 23592, 23592, 23592,
    23592, 24133, 24133, 24133, 24133, 24133, 24133, 24680, 24680, 24680,
    24680, 24680, 24680, 24680, 24680, 24680, 24680, 25237, 25237, 25237,
    25237, 25237, 25237, 25800, 25800, 25800, 25800, 25800, 25800, 26369,
    26369, 26940, 26940, 26940, 26940, 26940, 26940, 27517, 27517, 27517,
    27517, 27517, 27517, 27517, 27517, 27517, 27517, 28104, 28104, 28104,
    28104, 28104, 28104, 28697, 28697, 28697, 28697, 28697, 28697, 29296,
    29296, 29897, 29897, 29897, 29897, 29897, 29897, 30504, 30504, 30504,
    30504, 30504, 30504, 31117, 31117, 31117, 31117, 31734, 31734, 32353,
    32353, 32353, 32353, 32353, 32353, 32353, 32353, 32353, 32353, 32353,
    32353, 32984, 32984, 32984, 32984, 32984, 32984, 32984, 32984, 32984,
    32984, 33625, 33625, 34268, 34268, 34268, 34268, 34915, 34915, 34915,
    34915, 34915, 34915, 35568, 35568, 35568, 35568, 35568, 35568, 36227,
    36227, 36888, 36888, 36888, 36888, 36888, 36888, 36888, 36888, 36888,
    36888, 36888, 36888, 37561, 37561, 37561, 37561, 38238, 38238, 38238,
    38238, 38238, 38238, 38921, 38921, 38921, 38921, 38921, 38921, 38921,
    38921, 39612, 39612, 39612, 39612, 39612, 39612, 39612, 39612, 39612,
    39612, 40313, 40313, 40313, 40313, 40313, 40313, 40313, 40313, 41022,
    41022, 41022, 41022, 41022, 41022, 41022, 41022, 41022, 41022, 41741,
    41741, 41741, 41741, 41741, 41741, 41741, 41741, 42468, 42468, 42468,
    42468, 42468, 42468, 43201, 43201, 43201, 43201, 43201, 43201, 43940,
    43940, 43940, 43940, 44683, 44683, 44683, 44683, 44683, 44683, 44683,
    44683, 45434, 45434, 45434, 45434, 45434, 45434, 46191, 46191, 46191,
    46191, 46952, 46952, 46952, 46952, 46952, 46952, 46952, 46952, 47721,
    47721, 47721, 47721, 48494, 48494, 48494, 48494, 48494, 48494, 48494,
    48494, 48494, 48494, 48494, 48494, 48494, 48494, 49281, 49281, 49281,
    49281, 49281, 49281, 49281, 49281, 49281, 49281, 50078, 50078, 50078,
    50078, 50078, 50078, 50078, 50078, 50078, 50078, 50078, 50078, 50887,
    50887, 51698, 51698, 51698, 51698, 51698, 51698, 51698, 51698, 51698,
    51698, 52519, 52519, 53342, 53342, 53342, 53342, 54169, 54169, 54998,
    54998, 54998, 54998, 54998, 54998, 54998, 54998, 54998, 54998, 55837,
    55837, 55837, 55837, 55837, 55837, 55837, 55837, 55837, 55837, 55837,
    55837, 55837, 55837, 56690, 56690, 56690, 56690, 57547, 57547, 58406,
    58406, 58406, 58406, 59269, 59269, 59269, 59269, 59269, 59269, 59269,
    59269, 59269, 59269, 59269, 59269, 59269, 59269, 60146, 60146, 60146,
    60146, 61027, 61027, 61910, 61910, 61910, 61910, 62797, 62797, 62797,
    62797, 62797, 62797, 62797, 62797, 62797, 62797, 62797, 62797, 62797,
    62797, 62797, 62797, 62797, 62797, 62797, 62797, 63704, 63704, 63704,
    63704, 64615, 64615, 64615, 64615, 64615, 64615, 64615, 64615, 65534,
    65534, 65534, 65534, 65534, 65534, 65534, 65534, 65534, 65534, 66463,
    66463, 66463, 66463, 66463, 66463, 66463, 66463, 67400, 67400, 67400,
    67400, 68341, 68341, 68341, 68341, 68341, 68341, 69288, 69288, 69288,
    69288, 69288, 69288, 70241, 70241, 70241, 70241, 70241, 70241, 70241,
    70241, 70241, 70241, 70241, 70241, 70241, 70241, 71208, 71208, 71208,
    71208, 72179, 72179, 72179, 72179, 72179, 72179, 73156, 73156, 73156,
    73156, 73156, 73156, 74139, 74139, 74139, 74139, 74139, 74139, 74139,
    74139, 75130, 75130, 75130, 75130, 75130, 75130, 76127, 76127, 76127,
    76127};
int main() {
  scanf("%d", &n);
  printf("%d\n", answers[n]);
}
0