题解列表

筛选

字符串p型编码+遍历思想

摘要:解题思路:利用遍历的思想,将一位数与后面的数进行比较,当遇到不同的数时,停止记数,并进行输出,在跳过累加的数,进行下一个数的记数。注意事项:参考代码:#include<stdio.h>#include……

连续出现的字符

摘要:解题思路:利用排序法的思路,进行遍历比较注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int k;char str[1000]; s……

内存空间(模拟题)

~~~importjava.util.Scanner;publicclassMain{publicstaticvoidmain(String[]args){newMain().run();}voidrun(){Scannerin=newScanner(System.in);intt=in.nextIn

密码(简单易解)

```c#include#includeintmain(){intn,i,j,cnt,flag1,flag2,flag3,flag4;chars[100];scanf("%d",&n);for(i=0;i='A'&&s[j]='a'&&s[j]='0'&&s[j]=8&&cnt=3){printf("

最多约数问题

解题思路:很难受这个题我写不出能AC的代码,一部分是因为PYTHON的特性,一部分是我太菜了,下方这个代码是我学习仿照C++栏中CtrlCV工程师老哥的代码,这个思路我是完全想不到,勉强看懂了自己恐怕也写不出来,有没有大佬还能优化以下代码让我效率高一点,别超时了,万一比赛时遇到此类情况咋办啊,哭死。

一个数组位操作实现转置

摘要:#include<stdio.h> static x = 0; int main() {     int arr[3][3];     int i = 0, j = 0;     for ……

1000:简单的a+b

摘要:参考代码:#include<iostream> using namespace std; int main() {     int a,b;     while(cin>>a>>b)cout……

简单的a+b

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main() { int a,b; cin>>a>>b; int c=a+b; cou……

求1+……+n的值

摘要:参考代码:#include<bits/stdc++.h> using namespace std; int main(){     long long n;     cin>>n;     ……