【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

相关推荐
猫头虎32 分钟前
如何查看局域网内IP冲突问题?如何查看局域网IP环绕问题?arp -a命令如何使用?
网络·python·网络协议·tcp/ip·开源·pandas·pip
沿着路走到底39 分钟前
python 基础
开发语言·python
沐知全栈开发2 小时前
C# 委托(Delegate)
开发语言
任子菲阳2 小时前
学Java第三十四天-----抽象类和抽象方法
java·开发语言
烛阴2 小时前
武装你的Python“工具箱”:盘点10个你必须熟练掌握的核心方法
前端·python
学Linux的语莫2 小时前
机器学习数据处理
java·算法·机器学习
csbysj20203 小时前
如何使用 XML Schema
开发语言
R6bandito_3 小时前
STM32中printf的重定向详解
开发语言·经验分享·stm32·单片机·嵌入式硬件·mcu
earthzhang20213 小时前
【1007】计算(a+b)×c的值
c语言·开发语言·数据结构·算法·青少年编程
杨枝甘露小码3 小时前
Python学习之基础篇
开发语言·python