Information
- ID
- 105
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- # Submissions
- 742
- Accepted
- 319
- Uploaded By
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
int count = 0;
for (int x = 1; x <= 2021; ++x)
{ // x从1到2021
for (int y = 1; y <= 2021; ++y)
{ //y从1到2021
if (x * y <= 2021)
{
count++; // 如果 x * y 不超过 2021,则满足条件,增加计数
}
}
}
cout <<count << endl;
return 0;
}
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.