【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

相关推荐
代码游侠几秒前
应用——Linux Framebuffer 图形库显示
linux·运维·服务器·数据库·笔记·算法
ejjdhdjdjdjdjjsl2 分钟前
C#控件事件与数据存储实战
开发语言·c#
不过如此19513 分钟前
Python操作Jira实现不同项目之间的Issue同步
python·jira·issue
胖咕噜的稞达鸭3 分钟前
算法日记分治:用归并排序解决逆序对问题
算法
mengchanmian7 分钟前
jdk访问https导入证书问题解决
java·开发语言·https
曲幽8 分钟前
FastAPI + TinyDB并发陷阱与实战:告别数据错乱的解决方案
python·json·fastapi·web·并发·queue·lock·文件锁·tinydb
我叫袁小陌12 分钟前
C++内存分布详解
开发语言·c++
林shir13 分钟前
3.3-Web前段开发-JavaScript(AI)
开发语言·前端·javascript
一条咸鱼_SaltyFish13 分钟前
[Day7] contract-ai深度剖析:大模型适配项目的架构设计与策略实现
java·开发语言·人工智能·经验分享·程序人生·开源软件·个人开发
输出的都是我的15 分钟前
搭配GitHub Copilot 提升VS code使用技巧 - 新手向
vscode·python