【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

相关推荐
一只旭宝几秒前
预约系统版本2(pyhton+flask可视化版本)
服务器·数据库·c++·笔记·python·flask
树獭哥7 分钟前
量化金融入门:从数据规则到随机游走与凯利公式
人工智能·算法·金融·量化金融
筱璦10 分钟前
PHP+ VUE3机构级股票分仓管理交易系统源码可出
开发语言·php·vue3·量化·股票分仓
爱奥尼欧13 分钟前
10.C++ string 实现详解
java·开发语言·c++
小飞学编程...15 分钟前
【equals 、Comparable、Comparator 三者的区别】
java·python
青 春 记 忆22 分钟前
零基础入门python21:Flask账本的数据模型——用户、分类和账目
python·flask·后端开发
骇客野人23 分钟前
Java分布式任务调度方案(完整落地指南)
java·开发语言·分布式
hy.z_77728 分钟前
【软件测试】8. 自动化测试实践
python
JacksonMx29 分钟前
Spring @Async 坑点 + 改造方案
java·开发语言
你怎么知道我是队长40 分钟前
IPv6 地址完全解析:从结构到实战
开发语言·php