题解列表

筛选

20221123字符逆序

摘要:解题思路:注意事项:字符串长度为l,则旧/新字符串下标最大均为l-1;参考代码:#include <stdio.h>#include <string.h>int main(){     int i,j……

C语言训练-阶乘和数*

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#include<math.h>using namespace std;int main(){     for(int i=……

一个采购唯一会的才方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    char ch[100000];    fgets(ch,99999,……

20221124The 3n + 1 problem

摘要:解题思路:注意事项:输入&a,&b不确定其大小参考代码:#include <stdio.h>long len(long n){ long c=1; while(n!=1) { if (n%2==0……

20221124Minesweeper

摘要:解题思路:创建一个(二维)字符数组与一个(二维)整数数组在字符数组中输入&#39;*&#39;或&#39;.&#39;时进行判断:若&#39;*&#39;,则将其符号数组下标对应相同下标的整数数组元素……

1173: 计算球体积

摘要:解题思路:注意事项:参考代码:import mathwhile True:    try:            r = float(input())        pi = math.pi     ……

简单易懂,两个函数给出答案

摘要:解题思路:先用compare函数对比出三个字符串的大小,再用compute函数排出次序。注意事项:1. compare函数返回的是一个数组指针,所以必须将其声明为一个指针函数。参考代码:#includ……