题解列表

筛选

[编程入门]二维数组的转置

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

字符统计——三个for循环搞定

####思路:1.利用辅助数组,遍历字符串统计每个字符出现的次数2.用临时变量max,遍历数组,求出最多出现次数3.再遍历一次数组,出现次数等于max的都输出####具体代码:```importjava.util.Scanner;publicclassMain{staticint[]arr=newin

题目 1118: Tom数【两行代码】

摘要:解题思路:[int(i) for i in input()] :将输入的数字字符串转换为列表,其实就是迭代的过程sum() :对列表内的数据进行求和注意事项:无参考代码:while True:   ……

三行代码解决

摘要:解题思路:扩展欧几里得算法参考代码:#include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; ……

,,,,,,,,,,,

摘要:解题思路:注意事项:参考代码:#include <stdio.h>struct student{    char number[100];    char name[100];    int scor……

C++ 代码演示 注意条件的过滤

1.要求因子和相等;2.要求亲密数不同;3.要求亲密数对唯一;4.要求亲密数对大的在后,小的在前;```#include#include#include#include#include#definelllonglongusingnamespacestd;constintInf=1e4;intM,