【CodinGame】趣味算法(教学用) CLASH OF CODE -20240804

文章目录


正文

python 复制代码
import math
import sys

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.

n = int(input())
j = 1
h = 0

for i in range(1, n + 1):
    j *= i
    h += i

print(j)
print(h)

python 复制代码
import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.

h = int(input())

for i in range(6):
    h = h*2

print(h)

python 复制代码
import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.

a, b = [int(i) for i in input().split()]
n = int(input())
for i in range(n):
    x = int(input())
    print(a*x + b)

python 复制代码
import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.

time = int(input())
speed = int(input())

# Write an answer using print
# To debug: print("Debug messages...", file=sys.stderr, flush=True)

print(int(time/60*speed))

python 复制代码
import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.

count = int(input())
for i in input().split():
    n = int(i)
    print(f"[x] {n}" if n % 2 != 0 else f"[ ] {n}")

写在最后

欢迎技术类的问题到这里提出,我会逐个解答


END

相关推荐
IDIOSF3 分钟前
R语言 下载安装教程(附安装包)R语言4.5安装步骤(保姆级)
开发语言·其他·r语言
乱七八糟的屋子4 分钟前
LibYAML超全教程-C语言YAML解析与生成
c语言·开发语言·配置文件·yaml解析·libyaml·开源库实战
X1A0RAN4 分钟前
Python 并发请求性能优化实战
python·性能优化·并发编程
陈同学xxx10 分钟前
Hermes Agent 接入飞书,在手机上随时聊天
linux·python·飞书
小肝一下11 分钟前
2. 顺序表和链表
c语言·数据结构·c++·链表·dijkstra·依蕾娜·香香的依蕾娜
paopaokaka_luck11 分钟前
基于Springboot3+Vue3的宠物殡葬管理系统(webSocket实时通讯、接入腾讯地图、支付宝沙盒支付、Echarts图形化分析)
java·开发语言·网络·后端
j7~15 分钟前
【数据结构初阶】带头双向循环链表 (DSList) --增删查改完整实现详解
c语言·数据结构·链表·带头双向循环链表
卷无止境15 分钟前
Python 中基于 Qt 的 GUI 库授权方式全解析
后端·python
逝水无殇15 分钟前
HTML 元素详解
开发语言·前端·html
大鱼>27 分钟前
宠物行为识别AI算法详解:从数据采集到模型部署的完整方案
人工智能·深度学习·算法·宠物