package com.vfsd.core; public class Test1 { public static int[] a1= {3,8,2,5,1,9}; public static void main(String[] args) { print1(); for(int k=0;k<a1 ...
分类:
其他好文 时间:
2021-01-21 10:35:53
阅读次数:
0
Python的第五天 1、break 和continue continue:跳过本次循环,进入下一次循环 break:结束当前循环 for i in range(1,6): print(f" {i} 层 ") if i == 3: print("三层坏了") continue for j in ra ...
分类:
编程语言 时间:
2021-01-20 11:59:39
阅读次数:
0
目录 | 下一节 (2 处理数据) 1. Pyton 简介 本章是第一章,将会从头开始介绍 Python 基础知识,让你从零开始,学会怎么编写、运行、调试一个简单的程序。最后,你可以运用这些 Python 基础知识,去编写一个简短的脚本,读取 csv 数据并执行一些简单的计算。 1.1 Python ...
分类:
编程语言 时间:
2021-01-16 11:59:52
阅读次数:
0
思路:防御式编程,在收尾都加1个0,这样方便循环 bool canPlaceFlowers(vector<int> &flowerbed, int n) { if (n == 0) return true; if (flowerbed.size() == 0) return false; flowe ...
分类:
其他好文 时间:
2021-01-05 10:57:55
阅读次数:
0
char * getHint(char * secret, char * guess){ int shash[10]={0}; int ghash[1000]={0}; int i, len=strlen(secret), A=0, B=0, l=0; char* s=(char*)calloc(1 ...
分类:
其他好文 时间:
2021-01-05 10:37:37
阅读次数:
0
int* majorityElement(int* nums, int numsSize, int* returnSize){ int* res =(int*)calloc(2,sizeof(int)); *returnSize=0; if (nums == NULL || numsSize == ...
分类:
其他好文 时间:
2021-01-01 12:50:50
阅读次数:
0
从扑克牌中随机抽5张牌,判断是不是一个顺子,即这5张牌是不是连续的。2~10为数字本身,A为1,J为11,Q为12,K为13,而大、小王为 0 ,可以看成任意数字。A 不能视为 14。来源:LeetCode:https://leetcode-cn.com/problems/bu-ke-pai-zho ...
分类:
其他好文 时间:
2021-01-01 12:19:19
阅读次数:
0
nvm arch [32|64]: Show if node is running in 32 or 64 bit mode. Specify 32 or 64 to override the default architecture. nvm install <version> [arch]: T ...
分类:
其他好文 时间:
2020-12-24 12:04:21
阅读次数:
0
python之循环控制流while 和 for 一、while循环 1)定义 while 条件表达式: 条件表达式为True的时候,运行的代码块 一般会有变量值的变化 条件不满足时会跳出循环体,运行代码 2)break语句:强制结束循环,退出循环体 3)continue语句:结束当前这一次的循环,c ...
分类:
编程语言 时间:
2020-12-24 11:48:47
阅读次数:
0
实在不知道错哪了。。。 对着 std 检查了好几遍了QAQ 题解见注释(不过估计题解也是错的,不然为什么写错啊QAQ #include<bits/stdc++.h> using namespace std; const int N=1<<16; int m,n,a,b; double pr[N],s ...
分类:
其他好文 时间:
2020-12-24 11:31:40
阅读次数:
0