Try Again

无聊随便敲敲

#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;
#define lowbit(x) (x&(-x))
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.141592653589793238462
#define INF 0x3f3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
int main()
{
    char a[1000];
    int int_max=-((1<<(sizeof(int)*8-1))+1);
    int int_min=1<<(sizeof(int)*8-1);
    double double_max=-((1<<(sizeof(double)*8-1))+1);
    double double_min=1<<(sizeof(double)*8-1);
    long long long_max=-((1<<(sizeof(long long)*8-1))+1);
    long long long_min=1<<(sizeof(long long)*8-1);
    float float_max=-((1<<(sizeof(float)*8-1))+1);
    float float_min=1<<(sizeof(float)*8-1);
    printf("%d %s\n",INT_MAX,itoa(INT_MAX,a,2));
    printf("%d %s\n",int_max,itoa(int_max,a,2));
    printf("%d %s\n",int_min,itoa(int_min,a,2));
    printf("%lf %s\n",double_max,itoa(double_max,a,2));
    printf("%lf %s\n",double_min,itoa(double_min,a,2));
    printf("%lld %s\n",long_max,itoa(long_max,a,2));
    printf("%lld %s\n",long_min,itoa(long_min,a,2));
    printf("%lf %s\n",float_max,itoa(float_max,a,2));
    printf("%lf %s\n",float_min,itoa(float_min,a,2));
    sprintf(a,"%X",100);
    return 0;
}

 

posted @ 2017-07-26 16:06  十年换你一句好久不见  阅读(174)  评论(0编辑  收藏  举报