This commit is contained in:
2025-01-14 20:19:17 +08:00
commit f606210553
17 changed files with 426 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#include <iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
string s;
char c;
cin >> s >> c;
printf("%s", (s.find(c) == string::npos) ? "false" : "true");
}
+20
View File
@@ -0,0 +1,20 @@
定义函数返回布尔值
内存限制:128 MB
时间限制:2.000 S
评测方式:文本比较
命题人:外部导入
提交:2506
解决:1849
题目描述
定义一个函数check(n,d),让它返回一个布尔值。如果数字d在正整数n的某位中出现则送回true,否则送回false。
例如check(325719,3)==true
输入
一行,整数n和数字d。
输出
一行,如果数字d在正整数n的某位中出现输出true,否则输出false。
样例输入 复制
325719 3
样例输出 复制
true
来源/分类
一本通第六章例题