题解列表

筛选

Hash映射求亲密数

#哈希映射~~~c++intmain(){inti;intj;intcount=0;intcmp;intHash[3001]{0};inttar_Arr[8]{0};//int*Hash=newint[3001]{0};//哈希表的创建for(i=1;i<3001;i++){for(j=i-1;j>0

1190: 剔除相关数

```cpp#include#include#include#includeusingnamespacestd;mapma;setse;structstr{strings;stringss;}str[10005];boolcmp(chara,

1189: 内码对称

```cpp#includeusingnamespacestd;typedeflonglongLL;intmain(){LLnum;intarr[32],total=0;while(cin>>num){for(inti=0;i>i)&1;boolis=true;for(inti=0;i

1188: 做幻方

```cpp#include#include#include#defineMOVEmagic[y-1][x+1]usingnamespacestd;intmain(){intn;while(cin>>n){intmagic[100][100],

python 简单易懂的求平均年龄-题解

摘要:解题思路:  用for循环来输入注意事项: 输入的是个整数(int)参考代码: n = int(input());s=k=0for i in range(n):    x = int(input())……

晶晶赴会选择语句

摘要:解题思路:利用switch语句注意事项:一定要用break语句结束参考代码:#include<stdio.h>int main(){    int a;    scanf("%d",&a);    s……

[编程入门]完数的判断

摘要:参考代码:#include<bits/stdc++.h> using namespace std; int main(void){ int n; int len=0; int arr[……

realloc动态分配内存

摘要:解题思路:注意事项:参考代码:#include<stdio.h>/*72 101 108 108 111 44                   32 119 111 114 108 100 

简单的a+b(C++代码)

摘要:解题思路:利用while循环判断输入的数据注意事项:主要换行操作参考代码:#include<iostream>using namespace std;int main(){    int a,b;  ……