【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

相关推荐
qq_317060953 分钟前
java之http client工具类
java·开发语言·http
robot_大菜鸟11 分钟前
python_openCV_计算图片中的区域的黑色比例
开发语言·python·opencv
AI让世界更懂你34 分钟前
漫谈设计模式 [18]:策略模式
python·设计模式·策略模式
Pandaconda37 分钟前
【C++ 面试 - 新特性】每日 3 题(六)
开发语言·c++·经验分享·笔记·后端·面试·职场和发展
这不巧了37 分钟前
Faker在pytest中的应用
python·自动化·pytest
chanTwo_0041 分钟前
go--知识点
开发语言·后端·golang
悟空丶12341 分钟前
go基础知识归纳总结
开发语言·后端·golang
北南京海1 小时前
【C++入门(5)】类和对象(初始类、默认成员函数)
开发语言·数据结构·c++
oennn欧冷1 小时前
中文关键字检索分析-导出到csv或者excel-多文件或文件夹-使用python和asyncio和pandas的dataframe
python·pandas·vba·asyncio·dataframe·completablefuture
小言从不摸鱼1 小时前
【NLP自然语言处理】文本处理的基本方法
人工智能·python·自然语言处理