题解列表

筛选

年龄与疾病

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,a[100],i; double z=0; double x=0; double c=0; do……

向量点积计算

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

创建vector数组对n进行分配并搜索

摘要:解题思路:空间换时间,使用创建多个vector存储求完数位和的数,从1开始计算,由于同一数位和的数小的一定在前面,所以直接push_back尾部插入.        插入完成后再用循环对vector的……

最大值和最小值的差

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,a[10000],i; int max; int min; int difference; sc……

scanf和gets的混合使用

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    char a[1001];    int n;    scanf("%d",&n);//scanf结束回车……

买图书的小明

摘要:解题思路:注意事项:参考代码:#includeint main(){ double n,m,s; scanf("%lf %lf",&n,&m); s=n-0.8*m; if(n==10&&m==1) ……

结构体之成绩记录

摘要:解题思路:用结构体数组来解决问题注意事项:见代码参考代码:#include <stdio.h>typedef struct student{ char id[20]; char name[20]; i……

2819: 数字反转(python)

摘要:解题思路:注意事项:参考代码:n = int(input()) if n < 0:     print("-",end = "")     n = -n n = str(n)[::-1] ……

学霸的迷宫

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;char c[1007][1007];int vis[1007][1007];int……