文章

13

粉丝

17

获赞

2

访问

3.8k

头像
礼炮车 题解:
P1913 厦门大学2018年机试
发布于2024年6月12日 11:42
阅读数 247

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int count = 0;
	int time1 = 0;
	int time2 = 0;
	int time3 = 0;
	for(int i = 1;i<=21;i++)
	{
		time1= i*5;
		if(time1%6 == 0 || time1 % 7 ==0) ;
		else count++;
	}
	for(int i = 1;i<=21;i++)
	{
		time2 =  i*6;
		if(time2 %7 ==0);
		else count++;
	}
	count+=21;
	cout<<count;
	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发