懒懒的做法 摘要: 解题思路:求余数用 %注意事项:(+-)a%b=(+-)ca%(-+b)=c参考代码: #include<stdio.h> #define N(a,b) a%b int main…… 题解列表 2023年12月23日 0 点赞 0 评论 404 浏览 评分:0.0
宏定义求解取余 摘要:解题思路:直接使用宏定义求解即可注意事项:参考代码:#include<iostream>using namespace std;#define dfs (a%b)int main(){ int …… 题解列表 2024年01月21日 0 点赞 0 评论 485 浏览 评分:0.0
c语言的宏定义 摘要:解题思路:根据宏定义的解释,再了解逻辑式注意事项:别忘记定义余数;参考代码:#include<stdio.h>#define chan(a,b) c=a%b;int main(){ int a,…… 题解列表 2024年01月28日 0 点赞 0 评论 470 浏览 评分:0.0
题解 1037: [编程入门]宏定义的练习 摘要:##思路 `a%b`即可。 ##代码 ```cpp #include using namespace std; int main(){ int a,b; cin>>a>>b; …… 题解列表 2024年02月07日 0 点赞 1 评论 549 浏览 评分:9.9
1037: [编程入门]宏定义的练习(Python) 摘要:解题思路:自定义函数注意事项:区分算数运算符的运用:/ 除 60/10 6 % 取余 10%9 1 参考代码:def much_1(a,b): …… 题解列表 2024年03月11日 1 点赞 0 评论 654 浏览 评分:6.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #define YU(x,y) x%y int main() { int x,y; scanf("%d %d…… 题解列表 2024年04月27日 0 点赞 0 评论 578 浏览 评分:0.0
1037 宏定义的练习(相当于函数,不过有些参数需要声明) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define qiuyu(a,b) t=a%b;int main(){ int m,n,t; scanf("%d%d",&m,&n);…… 题解列表 2024年05月16日 0 点赞 0 评论 494 浏览 评分:0.0
用函数写的 摘要:解题思路:注意事项:参考代码:def get_sum(a=4,b=3): a,b =map(int,input().split()) sum = a%b print(sum)get_…… 题解列表 2024年06月02日 0 点赞 0 评论 690 浏览 评分:10.0
编写题解 1037: [编程入门]宏定义的练习 摘要:```c #include #define compute(a,b) result=a%b; int main() { int a,b,result; scanf("%d %d",&a…… 题解列表 2024年06月04日 0 点赞 0 评论 825 浏览 评分:9.9
[编程入门]宏定义的练习 摘要:解题思路:定义一个宏定义,求取a b的余数注意事项:取余符号是%参考代码:#include<stdio.h>#define reasu (a%b)main(){ int a,b; s…… 题解列表 2024年08月27日 0 点赞 0 评论 579 浏览 评分:0.0