zoukankan      html  css  js  c++  java
  • A题笔记(6)

    No. 3040

    代码量好少,主要考到数学知识

    唯一需要注意的是变量的类型

    int -2147483648 ~ +2147483647 (4 Bytes)

    long 在32位机器中 int 类型 和 long 类型通常字长是相同的 = int (4Bytes)

       在64位机器中 = int64_t -9223372036854775808 ~ +9223372036854775807 (8 Bytes)

    long long  = int64_t -9223372036854775808 ~ +9223372036854775807 (8 Bytes) 

       long long int 不是所有编译器都支持的,有些支持这种数据类型的,可能是真支持,也可能是模拟支持,总之它不是标准类型。

       在.NET4框架中,有64位的长整型数据,这个框架下的所有语言都能使用,但不是所有语言本身都有定义这样的数据类型,也就是说,你尽可使用_int64或System.Int64来定义64位的整数,但未必有long long这样的定义。

    其他

    char -128 ~ +127 (1 Byte)
    short -32767 ~ + 32768 (2 Bytes)
    unsigned short 0 ~ 65535 (2 Bytes)
    int -2147483648 ~ +2147483647 (4 Bytes)
    unsigned int 0 ~ 4294967295 (4 Bytes)
    long == int
    long long -9223372036854775808 ~ +9223372036854775807 (8 Bytes)
    double 1.7 * 10^308 (8 Bytes)

    unsigned int 0~4294967295
    long long的最大值:9223372036854775807
    long long的最小值:-9223372036854775808
    unsigned long long的最大值:18446744073709551615

    __int64的最大值:9223372036854775807
    __int64的最小值:-9223372036854775808
    unsigned __int64的最大值:18446744073709551615

      _int64 在 codeblocks 里是 int64_t

  • 相关阅读:
    cs224n word2vec
    背包问题
    动态规划二
    动态规划
    递推求解
    Tmux 使用技巧
    LeetCode 75. Sort Colors
    LeetCode 18. 4Sum new
    LeetCode 148. Sort List
    LeetCode 147. Insertion Sort List
  • 原文地址:https://www.cnblogs.com/LeoGodfrey/p/3506854.html
Copyright © 2011-2022 走看看