0分求条!
查看原帖
0分求条!
1635974
a15667495696楼主2025/7/24 18:30
#include <bits/stdc++.h>
using namespace std;
//fixed << setprecision()
int n, m, t = 0;
int main(){
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m;
	for (int i = n; i <= m; i++)
	{
		int s = 1;
		for (int j = 2; j * j < i; j++)
		{
			if (i % j != 0)
			{
				s = 0;
				break;
			}
		}
		if (s == 1) t++;
	}
	cout << t;
	return 0;
}

本人蒟蒻

2025/7/24 18:30
加载中...