蓝桥杯刷题--python-10(2023填空题3)

0工作时长 - 蓝桥云课 (lanqiao.cn)

import datetime
time_str_list=[]
while(True):

    tmp=input()
    if not tmp: break
    time_str_list.append(tmp)

#
time_list=[datetime.datetime.strptime(t,"%Y-%m-%d %H:%M:%S")for t in time_str_list]
time_list.sort()
sum=0
for i in range(len(time_str_list)>>1):
    seconds=time_list[2*i+1]-time_list[2*i]
    # print(seconds)
    # print("++++++++++++")
    # print(seconds.total_seconds())
    sum+=seconds.total_seconds()
print(f'{sum:.0f}')
 

 0与或异或 - 蓝桥云课 (lanqiao.cn)

 

# 创建dp方程
arr = list([0] * 5 for _ in range(5))
op_ = [0]*11

ans=0

相关推荐

  1. --python-8(2023 填空)

    2024-02-22 08:30:03       59 阅读
  2. --python-10(2023填空3

    2024-02-22 08:30:03       58 阅读
  3. --python-3

    2024-02-22 08:30:03       50 阅读
  4. --python-9(2023填空2)

    2024-02-22 08:30:03       57 阅读
  5. _day3

    2024-02-22 08:30:03       39 阅读
  6. --python-2

    2024-02-22 08:30:03       48 阅读
  7. --python-1

    2024-02-22 08:30:03       63 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-02-22 08:30:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-02-22 08:30:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-02-22 08:30:03       82 阅读
  4. Python语言-面向对象

    2024-02-22 08:30:03       91 阅读

热门阅读

  1. docker搭建Postgresql主备集群

    2024-02-22 08:30:03       53 阅读
  2. js设计模式汇总

    2024-02-22 08:30:03       47 阅读
  3. 突破编程_C++_面试(数组(1))

    2024-02-22 08:30:03       48 阅读
  4. 嵌入式24——IO

    2024-02-22 08:30:03       52 阅读
  5. 计算机网络--物理层练习题

    2024-02-22 08:30:03       47 阅读
  6. MySQL中的高级查询

    2024-02-22 08:30:03       35 阅读
  7. mysql binlog

    2024-02-22 08:30:03       47 阅读
  8. el-date-picker(日期时间选择)那些事

    2024-02-22 08:30:03       51 阅读