2781: 奇偶ASCII值判断 摘要:解题思路:注意事项:参考代码:while 1: try: a = str(input()) if ord(a) % 2 == 0: print(…… 题解列表 2022年11月27日 0 点赞 0 评论 618 浏览 评分:0.0
优化求解---第n小的质数 注意事项:优化求解过程。优化1:第二层for循环中的sqrt(i),因数都是成对出现的。比如,100的因数有:1和100,2和50,4和25,5和20,10和10。看出来没有?成对的因数,其中一个必然小于等于100的开平方,另一个大于等于100的开平方。 题解列表 2022年11月27日 0 点赞 0 评论 613 浏览 评分:0.0
常规解法级数求和 摘要:结果:i = 1835421 Sn = 15.000000参考代码:#include<stdio.h>int main() { int k; double Sn = 0; scanf("%d",&k)…… 题解列表 2022年11月27日 0 点赞 0 评论 530 浏览 评分:0.0
自定义函数之字符串反转 摘要:解题思路:最简洁注意事项:参考代码:#include<stdio.h>#include<string.h>int fun(char a[]){ int n = strlen(a); return n;…… 题解列表 2022年11月27日 0 点赞 0 评论 345 浏览 评分:9.9
矩阵转换(矩阵转换) 解题思路:将原先的m行n列,变为n行m列。感谢大佬的思路,我真是个天才注意事项:参考代码:#includeintmain(){inti,j,m,n;inta[500][500];scanf("%d%d",&m,&n);for(i=0;i 题解列表 2022年11月27日 0 点赞 0 评论 715 浏览 评分:9.3 入门难度的题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int num[30];int maxnum;int main(){ stri…… 题解列表 2022年11月27日 0 点赞 0 评论 843 浏览 评分:9.9 计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[500][500]; int i,j,m,n; int sum=0; scanf("%d %d",&…… 题解列表 2022年11月27日 0 点赞 0 评论 542 浏览 评分:0.0 二级C语言-进制转换 %o解法与通解 摘要:第一种解法,直接用printf的%o格式打印。 ```c #include int main(){ int n; scanf("%d",&n); printf("%…… 题解列表 2022年11月27日 0 点赞 0 评论 640 浏览 评分:9.9 2779: 输出绝对值 摘要:解题思路: 这道题考察的是条件语句的应用注意事项:参考代码:a = float(input())if a >= 0: print('{:.2f}'.format(a)) #第一…… 题解列表 2022年11月27日 0 点赞 0 评论 874 浏览 评分:2.0 跟原先不使用函数一样的道理-C语言解决 摘要:解题思路:注意事项:参考代码:#include<stdio.h> void max(int a, int b, int c) { int max = 0; if (a > b) ma…… 题解列表 2022年11月27日 0 点赞 1 评论 643 浏览 评分:9.9 « 12...1739174017411742174317441745...59095910 »
入门难度的题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int num[30];int maxnum;int main(){ stri…… 题解列表 2022年11月27日 0 点赞 0 评论 843 浏览 评分:9.9
计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[500][500]; int i,j,m,n; int sum=0; scanf("%d %d",&…… 题解列表 2022年11月27日 0 点赞 0 评论 542 浏览 评分:0.0
二级C语言-进制转换 %o解法与通解 摘要:第一种解法,直接用printf的%o格式打印。 ```c #include int main(){ int n; scanf("%d",&n); printf("%…… 题解列表 2022年11月27日 0 点赞 0 评论 640 浏览 评分:9.9
2779: 输出绝对值 摘要:解题思路: 这道题考察的是条件语句的应用注意事项:参考代码:a = float(input())if a >= 0: print('{:.2f}'.format(a)) #第一…… 题解列表 2022年11月27日 0 点赞 0 评论 874 浏览 评分:2.0
跟原先不使用函数一样的道理-C语言解决 摘要:解题思路:注意事项:参考代码:#include<stdio.h> void max(int a, int b, int c) { int max = 0; if (a > b) ma…… 题解列表 2022年11月27日 0 点赞 1 评论 643 浏览 评分:9.9