首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
法拉利201903231900848
获赞
1728
粉丝
12
关注
0
看过 TA
27
男
西安交通大学
2020
C++
IP属地:未知
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑法拉利201903231900848吗?
发布(142)
刷题
法拉利201903231900848
2019-08-22 14:37
C++
放苹果
''' 放苹果分为两种情况,一种是有盘子为空,一种是每个盘子上都有苹果。 令(m,n)表示将m个苹果放入n个盘子中的摆放方法总数。 1.假设有一个盘子为空,则(m,n)问题转化为将m个苹果放在n-1个盘子上,即求得(m,n-1)即可 2.假设所有盘子都装有苹果,则每个盘子上至少有一个苹果,即最多剩下m-n个苹果,问题转化为将m-n个苹果放到n个盘子上 即求(m-n,n) ''' def f(m,n): if m<0 or n<0: &n...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-22 13:44
C++
2019-08-22
在牛客打卡40天,今天学习:刷题 16 道/代码提交 16 次
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-22 00:27
C++
查找组成一个偶数最接近的两个素数
#从中间开始找的话就是保证两个数差距最小,然后再分别判断两个数是不是质数,就可以了 import math def isPrime(num): for i in range(2,int(math.sqrt(num))+1): if num%i==0: ...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-21 11:24
C++
2019-08-21
在牛客打卡39天,今天也很努力鸭!
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-20 23:00
C++
找出字符串中第一个只出现一次的字符(题面已经更新)
while True: try: s=input() for i in s: if s.count(i)==1: &n...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-20 22:20
C++
输入n个整数,输出其中最小的k个
while True: try: [n1,n2]=[int(i) for i in input().split()] s=[int(j) for j in input().split()] &nbs...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-20 21:30
C++
高精度整数加法
//大神的解法,MARK一下 #include<iostream> #include<cstring> using namespace std; int main() { char str1[500], str2[500]; while (cin >> str1 >> str2) {  ...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-20 17:34
C++
完全数计算
#include <iostream> using namespace std; int main(){ int n; while(cin >> n){ int count=0; for(int i...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-20 17:19
C++
2019-08-20
在牛客打卡38天,今天学习:刷题 4 道/代码提交 4 次
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-19 23:33
C++
从单向链表中删除指定值的节点
while True: try: s=input().split() n=int(s[0]) res=[s[1]] rm=s[-1] ...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-19 22:36
C++
按字节截取字符串
#python好秀 while True: try: s,n=input().split() n=int(n) if s[n-1].isalpha(): &nb...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-19 18:27
已编辑
C++
名字的漂亮度
#其实就是计算出各个字母出现的次数,出现次数最多的字母的“漂亮度”最大(26),后面按次数依次递减 while True: try: n=int(input()) s=[] for i in range(n): ...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-19 17:45
已编辑
C++
迷宫问题
//Mark一下大神的解法 #include<iostream> #include<vector> using namespace std; int N, M; //分别代表行和列 vector<vector<int>> maze;//迷宫矩阵 vector<vector<int>> path_temp;//存储当前路径,第一维表示位置 vector<vector<int>> path_best;//存储最...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-19 16:46
C++
学英语
#有些地方还有些迷糊,先MARK一下 def dps(n): m1 = 'one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen'.split(',') m2 = 'twenty,thirty,forty,fifty,sixty,seventy,eighty,...
0
点赞
评论
收藏
转发
法拉利201903231900848
2019-08-19 15:49
C++
2019-08-19
在牛客打卡37天,今天学习:刷题 8 道/代码提交 8 次
0
点赞
评论
收藏
转发
1
3
4
5
6
7
10
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务