上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: 记录学习时很好的一个解法~~ #include "stdio.h"#include "string.h"void DeleteSpa... 阅读全文
posted @ 2021-01-03 15:33 nepu_bin 阅读(54) 评论(0) 推荐(0)
摘要: 以下为本人在学习字符串时遇到的比较坑爹的问题,需要格外注意~~ 1. 字符串常量指的是第一个字符的地址 比如char c=“abcd... 阅读全文
posted @ 2021-01-02 16:25 nepu_bin 阅读(127) 评论(0) 推荐(0)
摘要: c语言学习成果巩固; 递归实现 好处在于不改变原字符串,仅仅是对字符串的逆序输出。 #includevoid print(char*... 阅读全文
posted @ 2021-01-02 13:00 nepu_bin 阅读(2153) 评论(0) 推荐(0)
摘要: 以下内容除代码外为转载 LeetCode官方题解给出的解释: 官方释义传送 厄拉多塞筛选法 class Solution {pub... 阅读全文
posted @ 2021-01-01 19:56 nepu_bin 阅读(184) 评论(0) 推荐(0)
摘要: 当时看到题一股脑就用for嵌套了。。QAQ写下此篇警戒时刻注意使用高阶算法!~~ #include "stdio.h"int mai... 阅读全文
posted @ 2020-12-31 22:06 nepu_bin 阅读(1115) 评论(0) 推荐(0)
摘要: 一般解法 思路:依次检查每一位是否有为1,将数的每一位与1进行位与运算,若位运算结果为1则计数器加一。 int count_1(in... 阅读全文
posted @ 2020-12-31 21:49 nepu_bin 阅读(85) 评论(0) 推荐(0)
摘要: 设两数为a,b,二者最大值为max,则最大值为 max=(( a + b ) + abs( a - b ) ) / 2 #inclu... 阅读全文
posted @ 2020-12-28 19:29 nepu_bin 阅读(254) 评论(0) 推荐(0)
摘要: #include “stdio.h” #include “math.h” int main() { int year, s,sum=... 阅读全文
posted @ 2020-12-28 16:20 nepu_bin 阅读(421) 评论(0) 推荐(0)
摘要: 按位异或实现(利用了集合的思想,完美解决这个问题) 理解按位异或的意义 对两个二进制数异或表示,两个二进制数字相同则为0,不同则为1... 阅读全文
posted @ 2020-12-19 16:20 nepu_bin 阅读(41) 评论(0) 推荐(0)
摘要: #include "stdio.h"int main(){ char a[50],i; void reverse(char a[],... 阅读全文
posted @ 2020-12-19 15:13 nepu_bin 阅读(80) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 下一页