【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

相关推荐
2401_838472513 分钟前
C++20概念(Concepts)入门指南
开发语言·c++·算法
yong99905 分钟前
基于MATLAB的GFSK调制解调实现
开发语言·matlab
点云SLAM8 分钟前
似然函数(Likelihood Function)和最大似然估计
算法·机器学习·概率论·数理统计·最大似然估计·似然函数·概率分布
红豆诗人10 分钟前
数据结构--顺序表
数据结构·顺序表
春日见11 分钟前
Docker中如何删除镜像
运维·前端·人工智能·驱动开发·算法·docker·容器
郝学胜-神的一滴13 分钟前
Python中的with语句与try语句:资源管理的两种哲学
linux·服务器·开发语言·python·程序人生·算法
Swift社区14 分钟前
Java 实战 -Error和Exception有什么区别?
java·开发语言
难得的我们14 分钟前
如何为开源Python项目做贡献?
jvm·数据库·python
季明洵17 分钟前
备考蓝桥杯第四天
java·数据结构·算法·leetcode·链表·哈希算法
焦糖玛奇朵婷24 分钟前
就医陪诊小程序|从软件开发视角看实用度✨
java·大数据·jvm·算法·小程序