yolo_mm 用筛法求之N内的素数
摘要:解题思路: 常规筛,把倍数筛去注意事项: i*i 而不是从2倍筛起,比如i=5,如果是两倍则在i=2的时候就已经筛去了参考代码:#include<bits/stdc++.h>using ……
(fly)1813: 蓝桥杯算法提高- c++_ch03_02(python代码)
摘要:解题思路:注意事项:参考代码:n=int(input())
if n ==1:
ls=[[1]]
if n ==2:
ls=[[1],[1,1]]
if n >2:
……
[编程入门]利润计算
摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(void){ int i; scanf("%d", &i); if (i <= 100000) ……
那个顺序放在后面还要好好理解一下
摘要:解题思路:也是看了题解注意事项:写在代码里面了参考代码:#include<stdio.h>int main(){ float m,n,sum=0,i=0,t; scanf("%f %f",&m,&n)……
新手编写,请批评指正
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h> int main(){ int a,b,t=0; scanf("%d%d",&a,&b);……
C++题解,重点弄清题意
摘要:解题思路:注意事项:分糖果的时候是全部小朋友同时分的参考代码:#include<iostream>using namespace std;const int N = 100;int n;int a[N……