0
点赞
收藏
分享

微信扫一扫

蓝桥杯基础题第一次记录

大自然在召唤 2022-04-06 阅读 79
c++

🐾小喵简介:

💝博客主页:喵喵啃馒头

👏年龄:21岁 大三在读

✨爱好:记录美好 干饭 追剧 虽然很菜但每天都要进步一点点

第一篇代码日记🎈

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int year = 0;
    for(int i=1000; i<=9999 ;i++)
    {
        int a = i / 1000;
        int b = i / 100 % 10;
        int c = i / 10 % 10;
        int d = i % 10;
        if (a == c && d - b == 1)
            year++;
    }
    cout<<year<<endl;
    return 0;
 } 

举报

相关推荐

记录第一次

第一次博客记录

记录第一次使用QT

【无标题】第一次记录

记录第一次搭建博客

【学习记录】第一次随堂测

sql第一次

第一次打卡

0 条评论