本人第一篇 python 题解

· · 题解

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

处理对速度要求不大的高精度题目,直接用 python 的 int 就好啦。

思路已经很简单了,但题解区都是 C++,像我这种刚学 OI 的锰锌根本不会处理字符串,所以 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");