Acwing_ikun

4455

say774

lilydeng

Flyinsky
Apricity_1
andy20110427

lhf123
The_Acute.
tianpan
Colin_Stack
honghong_Bye

WangJY

yydsw2x
ikun604
Whalefall.

PS：你问机器人是几的版本，都是3.5，就算在官网用20刀买的问也是3.5，网上有许多辨别方式，可以看看。

5zox1tDuQCBNa98z
dXPTVMT8pHbL3sDL
VqdSZniL3hlo8yQ2
SSRgNVWWMXnj3Gqe
GIQSuA1H01hHYJx9
MIBFjhmdp0LAGvFI
cpmz1g1C6tQOwYCo
DFSjFxQM3oeqrKxA
dHPt44AnZkbgsTt3
JEdVJRC083XBFL3I



PS：你问机器人是几的版本，都是3.5，就算在官网用20刀买的问也是3.5，网上有许多辨别方式，可以看看。

5zox1tDuQCBNa98z
dXPTVMT8pHbL3sDL
VqdSZniL3hlo8yQ2
SSRgNVWWMXnj3Gqe
GIQSuA1H01hHYJx9
MIBFjhmdp0LAGvFI
cpmz1g1C6tQOwYCo
DFSjFxQM3oeqrKxA
dHPt44AnZkbgsTt3
JEdVJRC083XBFL3I



Copycount_trailing_zeros(n) == m


#include <iostream>
#include <vector>

using namespace std;

int count_trailing_zeros(int n) {
int count = 0;
while (n >= 5) {
n /= 5;
count += n;
}
return count;
}

vector<int> find_numbers_with_m_trailing_zeros(int m) {
int low = 1, high = m * 5;
vector<int> results;

while (low <= high) {
int mid = (low + high) / 2;
int zeros = count_trailing_zeros(mid);

if (zeros == m) {
int left = mid - 1, right = mid + 1;

while (count_trailing_zeros(left) == m)
left--;

while (count_trailing_zeros(right) == m)
right++;

for (int i = left + 1; i < right; ++i)
results.push_back(i);
break;
} else if (zeros < m) {
low = mid + 1;
} else {
high = mid - 1;
}
}

return results;
}

int main() {
int m;
cin >> m;

vector<int> numbers_with_m_trailing_zeros = find_numbers_with_m_trailing_zeros(m);

if (!numbers_with_m_trailing_zeros.empty()) {
cout << numbers_with_m_trailing_zeros.size() << endl;
for (int number : numbers_with_m_trailing_zeros)
cout << number << " ";
cout << endl;
} else {
cout << 0 << endl;
}

return 0;
}



# 桌面端： https://wwq.lanzouo.com/iFmgM0smyn7a

### 写作业，论文，学习必备，提高学习效率！

Acwing_ikun
1个月前
class Solution {

public int NumberOf1(int n) {
int res = 0;
for(int i = 0;i <= 31; i ++)
{

res += n>>i&1;

}

return res;
}

}


Acwing_ikun
1个月前
class Solution {

public void reOrderArray(int[] array) {
int cnt1 = 0, cnt2 = 0;
int[] jishu = new int [101];
int[] oushu = new int [101];
for(int num: array)
{
if(num%2!=0)
{
jishu[++cnt1] = num;
}else
{
oushu[++cnt2] = num;
}
}
for(int i = 1; i <= array.length; i ++)
{
if(i<=cnt1)
{
array[i-1] = jishu[i];
}else
{
array[i-1] = oushu[i - cnt1];
}
}
}
}


Acwing_ikun
1个月前
class Solution {
public int getMissingNumber(int[] nums) {
int res = 0;
HashMap<Integer, Integer> hp = new HashMap<>();
for(int num : nums)
{
hp.put(num,1);

}
for(int i = 0; i < nums.length + 1; i ++)
{
if(hp.containsKey(i) == false)
{
res = i;
}
}
return res;
}
}


Acwing_ikun
1个月前
class Solution {
public int getNumberOfK(int[] nums, int k) {
int cnt = 0;
for(int num:nums)
{
if(num == k)
{
cnt ++;
}
}
return cnt;
}
}


Acwing_ikun
1个月前
import java.util.Scanner;
import java.util.Stack;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
Stack<Integer> st = new Stack<>();
while(t -- > 0)
{
String s = sc.next();
if("push".equals(s))
{
int x = sc.nextInt();
st.push(x);
}else{
if("query".equals(s)){
System.out.println(st.peek());
}else if("pop".equals(s))
{
st.pop();
}else if("empty".equals(s))
{
if(st.empty())
{
System.out.println("YES");
}else
{
System.out.println("NO");
}
}
}
}
}
}