long long类型的输出
printf("%lld\n", res);
浮点数double类型的输入
scanf("%lf", &R);
浮点数double类型的输出并保留4位小数
printf("A=%0.4lf", A);
字符串类型的输入,不加&
char name[10];
scanf("%s", name);
c++int最大值大约2e9
long long 类型的数后缀加ll,比如0ll;
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long LL;
int main()
{
LL a = 2ll;
LL res = max(0ll, a);
cout << res << endl;
return 0;
}
2的31次方共有10位数
2的31减1,2147483647
32位最大值