题解列表
自定义函数处理素数,仅供参考,还有更简便的方法,欢迎各位大佬借鉴
摘要:参考代码:#includeint sushu(int a){ int i,flage=0; for(i=2;i<a;i++) { if(a%i==0)//判断是否是素数 { flage=1;/……
单精度输入三位小数输出
摘要:解题思路:注意事项:单精度要用float以及%f;参考代码:#include <stdio.h>int main(){ float a; scanf("%f",&a); printf("%.3f\n"……
数学思路来解这一道题的
摘要:解题思路:注意事项:参考代码:import mathwhile True: w, h = map(int, input().split()) if w==0 or h==0: ……
不同单词个数统-小白题解-C语言代码
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
#include <string.h>
char strArr[101];
char temp[101][101];
i……
蛇形矩阵 用dp函数来解答
摘要:解题思路:注意事项:参考代码:n=nt(input())dp=[[0]*n for i in rage(n)]dp[0][0]=1for i in range(1,n): dp[i][0]=dp……
编写题解 1027: [编程入门]自定义函数处理最大公约数与最小公倍数
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int p(int x,int y); int q(int m,int n); int a,b; s……