上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: iwtbf: target_include_directories(&{PROJECT_BINARY_DIR}) 是什么 GitHub Copilot: target_include_directories 是 CMake 中的一个命令,用于为目标添加包含目录。&{PROJECT_BINARY_DI 阅读全文
posted @ 2024-12-07 19:24 Kazuma_124 阅读(56) 评论(0) 推荐(0)
摘要: # TODO 1: Set the minimum required version of CMake to be 3.10 cmake_minimum_required(VERSION 3.10) # TODO 2: Create a project named Tutorial project( 阅读全文
posted @ 2024-12-07 17:15 Kazuma_124 阅读(25) 评论(0) 推荐(0)
摘要: 以下为与AI的聊天内容,记录以供复习以及空闲时阅读使用 在软件开发中,库(library)是一组预编译的代码集合,可以被多个程序或模块共享和重用。库通常包含函数、类、数据结构和其他资源,开发者可以在自己的程序中调用这些库中的功能,而无需重新编写代码。 库可以分为两种主要类型: 静态库(Static 阅读全文
posted @ 2024-12-07 15:52 Kazuma_124 阅读(203) 评论(0) 推荐(0)
摘要: 实验 向零取整 int a = 8; int b = 3; int c = 6; int d1 = a / b; // 8 / 3 = 2 ( 2.667 --> 2) int d2 = a / c; // 8 / 6 = 1 ( 1.333 --> 1) int d3 = -a / b; // - 阅读全文
posted @ 2024-05-17 23:27 Kazuma_124 阅读(140) 评论(0) 推荐(0)
摘要: ​ 代码运行到第4行,getchar()需要输入的数据,但是输入的缓冲区没有数据,所以就需要再命令行窗口(黑窗口)输入新的数据 ​ 这时候getchar()只需要输入1个字符的数据,但是你可以输入多个数据,打回车的时候之前输入的一行数据都会被发送到缓冲区,回车之前都还可以删除刚才输入的数据修改修改, 阅读全文
posted @ 2024-05-16 13:44 Kazuma_124 阅读(288) 评论(0) 推荐(1)
摘要: C语言 #sscanf #代码学习 #codewars 题目链接:IP Validation | Codewars 代码如下: #include <stdio.h> int is_valid_ip(const char *addr) { unsigned n[4], i, nc; // Must b 阅读全文
posted @ 2024-02-06 21:01 Kazuma_124 阅读(43) 评论(0) 推荐(0)
摘要: 题目链接:https://www.codewars.com/kata/5426d7a2c2c7784365000783/python def balanced_parens(n): ''' To construct all the possible strings with n pairs of b 阅读全文
posted @ 2024-02-06 11:41 Kazuma_124 阅读(22) 评论(0) 推荐(0)
摘要: 题目链接:https://www.codewars.com/kata/5426d7a2c2c7784365000783/python 我的解决方案: def balanced_parens(n): # Your code here! used_l=[False for i in range(n)] 阅读全文
posted @ 2024-02-05 14:26 Kazuma_124 阅读(27) 评论(0) 推荐(0)
摘要: 题目的要求是写一个Sudoku类,类中要有一个实例函数判断传给对象的二维数组是否符合数独规则 题目链接:https://www.codewars.com/kata/540afbe2dc9f615d5e000425/python 下面是写完题后看到的别人的解决方法 from itertools imp 阅读全文
posted @ 2024-02-03 19:09 Kazuma_124 阅读(45) 评论(0) 推荐(0)
摘要: 做题的时候有的测试点里竟然用True替换1,骗过了我的代码,结果没过测试点 lst = [1, True] for item in lst: if not isinstance(item, bool) and item == 1: print(item) 阅读全文
posted @ 2024-02-02 22:09 Kazuma_124 阅读(32) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页