【BestCoder】HDOJ 5062 Beautiful Palindrome Number

来源:互联网 发布:三菱plc编程电缆 编辑:程序博客网 时间:2024/05/21 09:35

简单题。。。。

#include <iostream>#include <queue> #include <stack> #include <map> #include <set> #include <bitset> #include <cstdio> #include <algorithm> #include <cstring> #include <climits>#include <cstdlib>#include <cmath>#include <time.h>#define maxn 100000#define maxm 300006#define eps 1e-10#define mod 1000000007#define INF 1e9#define lowbit(x) (x&(-x))#define mp make_pair#define ls o<<1#define rs o<<1 | 1#define lson o<<1, L, mid #define rson o<<1 | 1, mid+1, R typedef long long LL;typedef unsigned long long ULL;//typedef int LL;using namespace std;int main(void){    int _, n;    while(scanf("%d", &_)!=EOF) {        while(_--) {            scanf("%d", &n);            if(n == 0) printf("1\n");            if(n == 1) printf("9\n");            if(n == 2) printf("18\n");            if(n == 3) printf("54\n");            if(n == 4) printf("90\n");            if(n == 5) printf("174\n");            if(n == 6) printf("258\n");        }    }    return 0;}


0 0
原创粉丝点击