题目大意:给出i,输出第i个镜像数,不能有前导0.

题解:从外层开始模拟

#include <stdio.h>
int p(int x)
{
    int sum, i;
    ;i<=x;i++)
        sum *= ;
    return sum;
}
int main()
{
    ], c;
    while(~scanf("%d", &n))
    {
        )
            break;
        i=;
        *p((i-)/))
        {
            n -= *p((i-)/);
            i++;
        }
        c = (i+)/;
        t=;
        while(c)
        {
        c--;
        cs[t]=;
        while(n>p(c))
        {
            n -= p(c);
            cs[t]++;
        }
        t++;
        }
        cs[]++;
        ;j<t;j++)
            printf("%d", cs[j]);
        ==)
            printf(]);
        ;j>=;j--)
            printf("%d", cs[j]);
            printf("\n");
    }
    ;
}

UVA 12050 - Palindrome Numbers 模拟的更多相关文章

  1. Uva - 12050 Palindrome Numbers【数论】

    题目链接:uva 12050 - Palindrome Numbers 题意:求第n个回文串 思路:首先可以知道的是长度为k的回文串个数有9*10^(k-1),那么依次计算,得出n是长度为多少的串,然 ...

  2. POJ2402/UVA 12050 Palindrome Numbers 数学思维

    A palindrome is a word, number, or phrase that reads the same forwards as backwards. For example,the ...

  3. UVa 12050 - Palindrome Numbers (回文数)

    A palindrome is a word, number, or phrase that reads the same forwards as backwards. For example, th ...

  4. UVa - 12050 Palindrome Numbers (二分)

    Solve the equation: p ∗ e −x + q ∗ sin(x) + r ∗ cos(x) + s ∗ tan(x) + t ∗ x 2 + u = 0 where 0 ≤ x ≤ ...

  5. UVA - 13022 Sheldon Numbers(位运算)

    UVA - 13022 Sheldon Numbers 二进制形式满足ABA,ABAB数的个数(A为一定长度的1,B为一定长度的0). 其实就是寻找在二进制中满足所有的1串具有相同的长度,所有的0串也 ...

  6. UVa 10006 - Carmichael Numbers

    UVa 10006 - Carmichael Numbers An important topic nowadays in computer science is cryptography. Some ...

  7. Palindrome Numbers(LA2889)第n个回文数是?

     J - Palindrome Numbers Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu ...

  8. 2017ecjtu-summer training #1 UVA 12050

    A palindrome is a word, number, or phrase that reads the same forwards as backwards. For example, th ...

  9. UVa - 12050

    A palindrome is a word, number, or phrase that reads the same forwards as backwards. For example,the ...

随机推荐

  1. 对于Mybatis在C#.Net中个人使用的总结(一) Mybatis 的结果映射

    (图片中的文字上传之后就都看不清,我再图片的下边会用斜体字标清) 首先我在项目中使用Mybatis 是用XML完成映射的.至于XML这门语言,其实很简单的(对于入门来说,因为我是刚入门哈~),如果你还 ...

  2. android怎么换背景图片

    我不晓得一般是怎么做的,但是至少可以用两种方法,一种是用一个全屏的ImageView来当作背景,通过修改imageview来修改背景图片,一种是将你xml中最外层的那个布局,LinerLayout之类 ...

  3. Fatal error: Call to a member function bind_param() on a non-object in

    今天在练习 mysql是出现错误:   Fatal error: Call to a member function bind_param() on a non-object in 解决步骤: 1. ...

  4. zw版【转发·台湾nvp系列Delphi例程】HALCON ClipRegion

    zw版[转发·台湾nvp系列Delphi例程]HALCON ClipRegion procedure TForm1.Button1Click(Sender: TObject);var img : HI ...

  5. 雅虎工程师提供的CSS初始化代码

    body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,b ...

  6. 前端框架与UI搭配

    如果是 Angular 那就选 Ionic (一对好 CP)如果是 Vue 那就选 Vux (基于 WeUI)如果是 jQuery 那就选 Framework7 (iOS 和 Android 双皮肤) ...

  7. 鸟哥的linux私房菜学习记录之认识与分析登录档

    logwatch分析登录档

  8. 鸟哥的linux私房菜之档案与文件系统的压缩与打包

    00000001 节约空间 其实简单的说压缩就是把没有用到的0给去掉,解压的时候在加上 在linux中,压缩文件档案的扩展名大多是.tar,.tar.gz,tgz,gz,.Z,.bz2 compres ...

  9. redmine plugin

    http://wangsheng2008love.blog.163.com/blog/static/78201689200992064615770/

  10. Java中的BufferedReader 的readLine方法

    import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java ...