彩票
本帖最后由 hveagle 于 2023-4-14 20:28 编辑from random import randint
print(randint(0, 2), randint(0, 2))
中奖代码:2 1
如果想收获好运,别忘了评分{:10_281:}:
print(*) 这不很简单么 liuhongrun2022 发表于 2023-4-2 18:25
import random;
res: str = input();
res = res.split();
a: int = res;
b: int = res;
c: int = random.randint(0, 2);
d: int = random.randint(0, 2);
if (a == c): {
if (b == d): {
print(2)
}
else: {
print(1)
}
}
elif (b == d): {
print(1)
}
else: {
print(0)
}
《C式python》 歌者文明清理员 发表于 2023-4-2 19:40
《C式python》
666 liuhongrun2022 发表于 2023-4-2 19:41
666
#include<stdio.h>
import random;
def printf(s, *args):
print(s % args, end=str())
def main() -> int:
a: int = random.randint(0, 2);
b: int = random.randint(0, 2);
printf('%d %d\n', a, b);
return 0;
main();
将简单的问题复杂化{:10_256:}
pycharm:不符合规范!!!*114514 歌者文明清理员 发表于 2023-4-2 19:45
将简单的问题复杂化
pycharm:不符合规范!!!*114514
想复杂?木的问题from random import randint as r
a = randint(0,2)
b = randint(0,2)
astr = str(a)
bstr = str(b)
strall = a + " " + b
print(strall){:10_279:}python is very complicated.
页:
[1]