1
2
3
4
5
6
|
类型名称 字节数 取值范围
signed
char
1 -128~+127
short
int
2 -32768~+32767
int
4 -2147483648~+2147483647
long
int
4 -2147483648~+2141483647
long
long
int
8 -9223372036854775808~+9223372036854775807
|
int longlong uso de insumos% LLD, también con salida% LLD, con llabs valor absoluto ();
long int entrada% ld, la salida también con% ld, con los laboratorios de valor absoluto ();
Int tomar el valor absoluto ABS ();
flloat valor absoluto por FABS ();
De 64 bits del compilador:
INT: 4 bytes
largo: 8 bytes
largos largos: 8 bytes
unsigned long: 8 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
unsigned
int
(unsigned
long
)
4字节8位可表达位数:2^32=42 9496 7296
范围:0 ~ 42 9496 7295 (42*10^8)
int
(
long
)
4字节8位可表达位数:2^32=42 9496 7296
范围:-21 4748 3648 ~ 21 4748 3647 (21*10^8)
long
long
(
__int64
)
8字节8位可表达位数:2^64=1844 6744 0737 0960 0000
范围:-922 3372 0368 5477 5808 ~ 922 3372 0368 5477 5807 (922*10^16)
unsigned
long
(unsigned
__int64
)
8字节8位可表达位数:2^64=1844 6744 0737 0960 0000
范围:0 ~ 1844 6744 0737 0955 1615 (1844*10^16)
|
Título: Título del área de matriz PS es sencillo de entender, pero a largo long int tipos de entradas no tan bien como el valor absoluto de un largo tiempo = = ~ violín
título Descripción
entrada
No más de 100 rectángulos.
exportación
entrada de la muestra
1 2 3 4
1 0 2 3
2 1 3 1
2 8 7 1
Ejemplo de salida
0
3
4
35
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
mucho, mucho int x0, x1, y0, y1, temp;
mucho, mucho int i, j;
mucho, mucho int a [10000];
largo long int num = 0;
while (scanf ( "% LLD% LLD% LLD% LLD", y x0, y y0, y x1, y y1) = EOF!)
{
un [num ++] = llabs ((x1-x0) * (y1-y0));
// printf ( "% d \ n", un [num-1]);
}
For (i = 0; i <num-1; i ++)
{
for (j = 0; j <num-i-1; j ++)
{
si (a [j]> a [j + 1])
{
temp = un [j];
un [j] = a [j + 1];
un [j + 1] = temp;
}
}
}
For (i = 0; i <num; i ++)
{
printf ( "% LLD \ n", a [i]);
}
}