循环求和,一种简单的方法实现 摘要:解题思路:若 n = 5,设 变量 a = 0可推:2 = 2 x 1; (a)22 = 2 x 10 + 2 ( a = 2 * 10 + a)222 = 2 x 100 + 22 ( a = 2 …… 题解列表 2023年01月14日 0 点赞 0 评论 255 浏览 评分:0.0
亲和数(python代码) 摘要:def cal(x): total = 0 for i in range(1,x): if x%i==0: &nb 题解列表 2023年01月14日 0 点赞 2 评论 167 浏览 评分:0.0
编写题解 1050: [编程入门]结构体之成绩记录 新手向 有问必回 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;struct student { string number…… 题解列表 2023年01月14日 0 点赞 0 评论 262 浏览 评分:0.0
编写题解 1051: [编程入门]结构体之成绩统计2 适合新手 有问必答 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;struct student { string number…… 题解列表 2023年01月14日 0 点赞 0 评论 283 浏览 评分:0.0
学生能看懂的c++语言 摘要:解题思路:难点在于如何用计算机模拟人一次次选的过程.有n个人,我们就定义一个长度为n个的数组a[n]不妨将m个元素赋1,其他元素初始化0。用一个for循环一次次地访问这个数组,当m次时,将a[i]赋0…… 题解列表 2023年01月14日 0 点赞 0 评论 308 浏览 评分:0.0
去掉空格C语言 摘要:解题思路:误打误撞,代码小白,望大神在评论区指点一二注意事项:参考代码:#include<stdio.h>int main(){ char d[81]; while(gets(…… 题解列表 2023年01月14日 0 点赞 0 评论 240 浏览 评分:0.0
循环方法解题,笨方法基础算法 摘要:解题思路:循环注意事项:因为是10^18所以用long代替int参考代码:#include<stdio.h>int main(){ long a,b,n; int i,c; scanf("%ld…… 题解列表 2023年01月14日 0 点赞 0 评论 319 浏览 评分:0.0
基础算法,循环方法求解 奇偶性求解分开循环 摘要:解题思路:循环方式求解问题,通过半数 来求解注意事项 奇偶性质参考代码:#include<stdio.h>int main(){ int n,i,a; scanf("%d",&n); if(n%…… 题解列表 2023年01月14日 0 点赞 0 评论 363 浏览 评分:0.0
注意空格,好事多磨吧 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ cout << " " << "Nine-by-nine Multi…… 题解列表 2023年01月14日 0 点赞 0 评论 271 浏览 评分:0.0
不能四舍五入,所以要用点小技巧 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,t; double m; cin >> n >>…… 题解列表 2023年01月14日 0 点赞 0 评论 288 浏览 评分:0.0