1065 浙江中医药大学ACM OJ

来源:互联网 发布:js弹出提示框1秒消失 编辑:程序博客网 时间:2024/04/27 23:15


哈哈哈哈哈,时隔多年,又AC了一道题小小的嘚瑟下,让自己有动力去AC下一道题,

今天就要蓝桥杯选拔赛了呢,小小的激动了一把,虽然我还比较渣,但谁也不能阻止我成长

进入正题:




   绝对AC过了的代码:

#include <iostream>

#include<cstdio>
#include<cmath>


using namespace std;


int main()
{
    int n;


    int  a, b, c, d;
    scanf("%d", &n);
    a = n / 1000;
    b = (n / 100 ) % 10;
    c = (n / 10 ) % 10;
    d = n % 10;
    a = (a + 9) %10;
    b = (b + 9) %10;
    c = (c + 9) %10;
    d = (d + 9) %10;
    printf("The encrypted number is %d%d%d%d\n", c,d,a,b);
    return 0;
}

 最后附上浙江中医药这题地址:http://acm.zcmu.edu.cn/JudgeOnline/problem.php?id=1065

0 0
原创粉丝点击