Submission #00140


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include<bits/stdc++.h>
#define F first
#define S second
#define endl '\n'
#define MP make_pair
#define pb push_back
using namespace std;
typedef pair<int, int> P;
typedef pair<int, P> i_P;
typedef long long LL;
static const int INF = INT_MAX;
static const int MIN = INT_MIN;
static const LL L_INF = LLONG_MAX;
static const int MOD = 1000000000 + 7;
static const int SIZE = 100005;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
int cnt = 0;
int sum[1000005] = {};
for( int i = 1; i <= n; ++i ) {
for( int j = i; j <= n; j += i ) {
++sum[j];
}
}
for( int i = 1; i <= n; ++i ) {
if( sum[i] % 2 == 0 ) ++cnt;
}
cout << cnt << endl;
return 0;
}

ステータス

項目 データ
問題 0008 - マリア・アントーニア・ヨーゼファ・ヨハンナ・フォン・ハプスブルク=ロートリンゲン (Maria Antonia Josepha Johanna von Habsburg-Lothringen)
ユーザー名 crom
投稿日時 2019-06-18 17:24:58
言語 C++11
状態 Accepted
得点 13
ソースコード長 803 Byte
最大実行時間 37 ms
最大メモリ使用量 4628 KB

セット

セット 得点 Cases
1 ALL 13 / 13 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01 AC 20 ms 4312 KB
1
in02 AC 22 ms 4336 KB
1
in03 AC 23 ms 4364 KB
1
in04 AC 27 ms 4384 KB
1
in05 AC 24 ms 4408 KB
1
in06 AC 21 ms 4428 KB
1
in07 AC 22 ms 4584 KB
1
in08 AC 33 ms 4608 KB
1
in09 AC 21 ms 4628 KB
1
in10 AC 21 ms 4524 KB
1
in11 AC 25 ms 4424 KB
1
in12 AC 20 ms 4440 KB
1
in13 AC 21 ms 4456 KB
1
in14 AC 22 ms 4348 KB
1
in15 AC 37 ms 4372 KB
1
in16 AC 29 ms 4524 KB
1
in17 AC 18 ms 4416 KB
1
in18 AC 30 ms 4312 KB
1