皮皮灰灰辉
皮皮灰灰辉
全部文章
分类
题解(20)
归档
标签
去牛客网
登录
/
注册
皮皮灰灰辉的博客
全部文章
(共3篇)
题解 | #找出字符串中第一个只出现一次的字符#
牛客上c语言不方便使用hash表,便用数组存放次数,遍历两边字符串即可 #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char str[1005] = {0...
C
模拟
字符串匹配
2022-03-18
0
244
题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
直接算。 int main() { int n,i; scanf("%d", &n); double sum = n,tmp = n; for(i=1; i < 5; i++) { tmp = tmp/2; sum...
C
模拟
2022-03-16
0
216
题解 | #字符串加密#
简单的模拟,实现见如下代码 #include <stdio.h> #include <string.h> int main() { char in[101]; char key[101]; scanf("%s", key); scanf("...
C
模拟
2022-03-16
0
222