当前位置: 首页 > wzjs >正文

卖网站赚钱吗安庆seo

卖网站赚钱吗,安庆seo,it运维体系,网站菜单分类怎么做的九宫幻方 题目链接:https://www.lanqiao.cn/problems/100/learning/?page1&first_category_id1&second_category_id3&tags%E7%9C%81%E8%B5%9B&tag_relationintersection 先旋转、镜像得到所有的情况,可以发现情况是可以暴力得出的。…

九宫幻方

题目链接:https://www.lanqiao.cn/problems/100/learning/?page=1&first_category_id=1&second_category_id=3&tags=%E7%9C%81%E8%B5%9B&tag_relation=intersection
在这里插入图片描述
在这里插入图片描述
先旋转、镜像得到所有的情况,可以发现情况是可以暴力得出的。接着就好办了,只需要对比就可以了。

import os
import sys# 请在此输入您的代码 data_baoli = [[4,9,2,3,5,7,8,1,6],[2,7,6,9,5,1,4,3,8],[6,1,8,7,5,3,2,9,4],[8,3,4,1,5,9,6,7,2],[8,1,6,3,5,7,4,9,2],[2,9,4,7,5,3,6,1,8],[6,7,2,1,5,9,8,3,4],[4,3,8,9,5,1,2,7,6]]ls = list()
for _ in range(3):ls1, ls2, ls3 = map(int, input().split())ls.append(ls1)ls.append(ls2)ls.append(ls3)
# print(ls)
ans = 0
for i in range(len(data_baoli)):ok = 1for j in range(9):if ls[j] != data_baoli[i][j] and ls[j] != 0:ok = 0breakif ok:ans += 1outcome = data_baoli[i]
# print(outcome)
if ans == 1:for i in range(3):print(outcome[3*i], outcome[3*i+1], outcome[3*i+2])
else:print('Too Many')

拉马车

题目链接:
https://www.lanqiao.cn/problems/101/learning/?page=1&first_category_id=1&second_category_id=3&tags=%E7%9C%81%E8%B5%9B&tag_relation=intersection
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
按照出牌规则模拟写代码即可。容易漏的是,当A空的时候,并且桌子上没有可以获得的牌子的时候就已经可以跳出来了,B不用再出牌,没跳出来的话,B就会少了一张牌子,导致没通过。这道题的测试用例没有出现不能赢的情况,因此-1的输出情况不用考虑。

import os
import sys# 请在此输入您的代码
A = list(input())
B = list(input())
# print(A,B)
flag_A = 1 # A先出牌
flag_B = 0
chupai = list()
while A != [] and B != []:if flag_A:flag_A = 0flag_B = 1A_chupai = A.pop(0)if A_chupai in chupai:# 找到出的牌子在序列中的位置position = chupai.index(A_chupai)chupai.append(A_chupai)huo_paizi = chupai[position:]A.extend(huo_paizi[::-1])# 更新牌chupai = chupai[:position]flag_A = 1flag_B = 0else:chupai.append(A_chupai)if A == []:breakif flag_B:flag_B = 0flag_A = 1B_chupai = B.pop(0)if B_chupai in chupai:# 找到出的牌子在序列中的位置position = chupai.index(B_chupai)chupai.append(B_chupai)huo_paizi = chupai[position:]B.extend(huo_paizi[::-1])# 更新牌chupai = chupai[:position]flag_B = 1flag_A = 0else:chupai.append(B_chupai)if B == []:breakif A:print(''.join(A))
elif B:print(''.join(B))

青蛙跳杯子

题目链接:https://www.lanqiao.cn/problems/102/learning/?page=1&first_category_id=1&second_category_id=3&tags=%E7%9C%81%E8%B5%9B,2017&tag_relation=intersection
在这里插入图片描述
在这里插入图片描述

import os
import sys# 请在此输入您的代码
source_ = list(input())
obj_ = list(input())
moves = [-1, 1, 2, -2, 3, -3]
# 存储每一种可能的情况和对应的步数
Q = [list([source_, 0])]
def bfs():# 遍历每一种可能的排序for v in Q:# 遍历树的每一种可能情况for move in moves:# qingwa = v[0][:]step = v[1]# 遍历每一只青蛙for i in range(len(v[0])):qingwa = v[0][:]if str(qingwa[i]) == '*':continueposition = qingwa.index('*')# 如果更新这只青蛙,更新后的坐标new_position = i + move# 如果新的坐标等于*的坐标,交换坐标,并生成新的排序if new_position == position:new_paixu = qingwanew_paixu[position], new_paixu[i] = new_paixu[i], new_paixu[position]if new_paixu == obj_:print(step + 1)returnok = False# 判断新排序是否在Q的排序中for j in range(len(Q)):if new_paixu == Q[j][0]:ok = Trueif ok is False:Q.append([new_paixu, step+1])bfs()

代码通过率为66.7%,剩下的超时了,待优化。

日期问题

题目链接:https://www.lanqiao.cn/problems/103/learning/?page=1&first_category_id=1&second_category_id=3&tags=%E7%9C%81%E8%B5%9B&tag_relation=intersection
在这里插入图片描述
在这里插入图片描述

不采用try…except…会报段错误。

import os
import sys# 请在此输入您的代码
from datetime import datetimedate_str = input().strip()
A, B, C = map(int, date_str.split('/'))
ans = set()
def con_year(x):if x>=60:return x+1900else:return x+2000
# 年月日
try:y = con_year(A)dt = datetime(y, B, C)if datetime(1960,1,1)<=dt<=datetime(2059,12,31):ans.add(dt)
except ValueError:pass# 月日年
try:y = con_year(C)dt = datetime(y, A, B)if datetime(1960,1,1)<=dt<=datetime(2059,12,31):ans.add(dt)
except ValueError:pass# 日月年
try:y = con_year(C)dt = datetime(y, B, A)if datetime(1960,1,1)<=dt<=datetime(2059,12,31):ans.add(dt)
except ValueError:pass
# print(ans)for dt in sorted(ans):print(dt.strftime("%Y-%m-%d"))
http://www.dtcms.com/wzjs/201584.html

相关文章:

  • 自己网站做问卷调查问卷如何去推广一个app
  • 怀柔住房和城乡建设委官方网站五八精准恶意点击软件
  • 自己做的网站如何百度能搜索如何注册网站
  • 做网站的软件 简单易学seo是什么
  • wordpress前台地址seo的搜索排名影响因素有哪些
  • 江苏建设管理中心网站微信搜一搜怎么做推广
  • 旅游美食网站模板seo英文
  • wordpress 实现注册快速排名优化公司
  • 手机网站自助建站系统网站优化外包多少钱
  • 苏州品牌网站设计企业最新军事新闻
  • 可以看国外网站的dns软文宣传推广
  • 如果在网站暗藏链接商城做推广专业竞价托管
  • 免费页面网站制作巩义网络推广
  • 怎么做一个网站 免费seo评测论坛
  • 网络公司给销售公司做网站seo工具有哪些
  • 在美国买云主机做网站西安百度竞价开户
  • 如何用Word做网站单页最近三天的新闻热点
  • 给人做网站的公司挖掘关键词的工具
  • 网站后台点击添加图片没有反应免费个人网页制作
  • 都市网东莞市网络seo推广价格
  • 佳木斯市网站建设昆明网络推广优化
  • 建设音乐网站的目的好用的种子搜索引擎
  • 关于网站建设的知识怎么推广自己的微信
  • 网站策划用培训吗网站百度seo关键词优化
  • app自己怎么开发软件靠谱的seo收费
  • 东莞杀虫公司东莞网站建设怎样做好服务营销
  • html5+css3旺道seo推广
  • 安康微信公众平台seo推广优势
  • 做虚拟货币交易网站教育培训机构报名
  • 专做婚宴用酒是网站seo高级优化方法