跳到正文

题解

本人第一篇 python 题解

EricWan约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年3月4日
篇幅
约 1 分钟
获赞
1
题目
P12681

版本

  1. v1当前

题解区怎么没有 pyhton?这种题 python 不是专业对口?

思路已经很简单了,但题解区都是 C++,像我这种刚学 OI 的锰锌根本不会处理字符串,所以 python 代码如下。

Python
n = int(input());
if n >= -(1 << 31) and n < (1 << 31) :
    print("int");
if n >= 0 and n < (1 << 32) :
	print("unsigned int");
if n >= -(1 << 63) and n < (1 << 63) :
	print("long long");
if n >= 0 and n < (1 << 64) :
	print("unsigned long long");
print("string");
原文