题解列表

筛选

The 3n + 1 problem(c语言代码) - 解决33%的错误

摘要:注意事项:i,j的输入大小顺序不确定因此要比较i,j并交换i,j要提前打印,如果输入时i>j,交换后,i,j的值就交换了,打印时就出错n = n*3+1可能导致溢出,因此直接将i,j,n全设为long……

编写题解 2920: 分数线划定

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>struct volun{    int k;    int s;};int main(){    in……

敲简单C语言代码!!!

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){   int i,j,n,r,p,q,k,w=0;   char a[100][100];   while(~sc……

敲简单C语言代码!!!

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){   int a[100][100];   a[0][0]=1;   int n;   scanf ("%d",&……

自定义函数之字符串连接

摘要:解题思路:定义三个数组,两个数组存放输入的数组,最后一个数组存放最终的数组注意事项:利用string函数库中strlen函数计算出个数组中的元素个数参考代码:# include <stdio.h># ……

利用sort巧妙解。

摘要:解题思路:    利用sort解题注意事项:    注意sort的用法参考代码:#include<bits/stdc++.h> using namespace std; typedef struc……

纯纯无脑暴力求解

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j=1,k=3,l=7,o=9; for (i = 1; i <= 4; i++) { print……