社区讨论

P1308 统计单词数求调(解决问题的大佬NOI必金

题目总版参与者 1已保存回复 0

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
0 条
当前快照
1 份
快照标识符
@lzmvtsr6
此快照首次捕获于
2024/08/09 23:49
2 年前
此快照最后确认于
2024/08/10 09:31
2 年前
查看原帖
CPP
#include<bits/stdc++.h>
using namespace std;
int cnt,b;
int main()
{
	string str,s;
	cin>>s;
	b=stoi(s);
	while (cin>>str)
	{
		int a=stoi(str);
		if (str.size()==s.size()&&abs(a-b)%32==0)
		cnt++;
	}
	cout<<cnt;
	return 0;
}

回复

0 条回复,欢迎继续交流。

正在加载回复...