洛谷P1000-P1001题解

Hello大家好,我是阳了个阳C++。洛谷这个网站各位想必已经非常熟悉了,几乎是每位学习编程的人都会经常访问这个网站。

所以我计划从今天开始,除了更新一些C++小游戏外,还会发布一些洛谷的题解,希望大家喜欢。

特别声明:本文所有代码均为原创!!!

P1000:

题目:

 超级玛丽游戏
 题目描述

超级玛丽是一个非常经典的游戏。请你用字符画的形式输出超级玛丽中的一个场景。
                ********
               ************
               ####....#.
             #..###.....##....
             ###.......######              ###            ###
                ...........                       #...#          #...#
               ##*#######               #.#.#          #.#.#
            ####*******######        #.#.#          #.#.#
           ...#***.****.*###....          #...#          #...#
           ....**********##.....           ###            ###
           ....****    *****....
             ####        ####
           ######        ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
##########################################    #----------#
#.....#......##.....#......##.....#......#    #----------#
##########################################    #----------#
#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#
##########################################    ############

(这里和洛谷的字体不同,所以看着和原图不太一样,大家不要在意)
 

这道题算是洛谷的一个入门题,那么代码如下:

#include<bits/stdc++.h>
using namespace std;
int main(){
	cout<<"                ********"<<endl;
    cout<<"               ************"<<endl;
    cout<<"               ####....#."<<endl;
    cout<<"             #..###.....##...."<<endl;
    cout<<"             ###.......######              ###            ###"<<endl;
    cout<<"                ...........               #...#          #...#"<<endl;
    cout<<"               ##*#######                 #.#.#          #.#.#"<<endl;
    cout<<"            ####*******######             #.#.#          #.#.#"<<endl;
    cout<<"           ...#***.****.*###....          #...#          #...#"<<endl;
    cout<<"           ....**********##.....           ###            ###"<<endl;
    cout<<"           ....****    *****...."<<endl;
    cout<<"             ####        ####"<<endl;
    cout<<"           ######        ######"<<endl;
    cout<<"##############################################################"<<endl;
    cout<<"#...#......#.##...#......#.##...#......#.##------------------#"<<endl;
    cout<<"###########################################------------------#"<<endl;
    cout<<"#..#....#....##..#....#....##..#....#....#####################"<<endl;
    cout<<"##########################################    #----------#"<<endl;
    cout<<"#.....#......##.....#......##.....#......#    #----------#"<<endl;
    cout<<"##########################################    #----------#"<<endl;
	cout<<"#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#"<<endl;
	cout<<"##########################################    ############"<<endl; 
    return 0;
}

P1001:

题目:

 A+B Problem
题目描述

输入两个整数 a, b,输出它们的和。

输入格式

两个以空格分开的整数。

输出格式

一个整数。

这道题也是一道极其简单的题目,代码如下:

#include <iostream>
#include <cstdio>
using namespace std;
int main(){
    int a,b;
    cin>>a>> b;
    cout<<a+b<<endl;
    return 0;
}

今天的题解就到这里了,希望大家喜欢。

(作者悄悄地问一句,复制代码的时候能不能点个赞)

相关推荐

  1. P1000-P1001题解

    2024-04-06 19:26:01       38 阅读
  2. 入门P1000-P1482题解

    2024-04-06 19:26:01       30 阅读
  3. P1234题解

    2024-04-06 19:26:01       35 阅读
  4. P10397题解

    2024-04-06 19:26:01       29 阅读
  5. P10119 题解

    2024-04-06 19:26:01       22 阅读
  6. P1000 超级玛丽游戏()

    2024-04-06 19:26:01       47 阅读
  7. P1000超级玛丽游戏C++

    2024-04-06 19:26:01       37 阅读
  8. P8839~8841题解

    2024-04-06 19:26:01       22 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-06 19:26:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-06 19:26:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-06 19:26:01       82 阅读
  4. Python语言-面向对象

    2024-04-06 19:26:01       91 阅读

热门阅读

  1. 【C++】 二叉搜索树复习+模拟实现

    2024-04-06 19:26:01       39 阅读
  2. uview2 表单Form校验validate不生效处理方法

    2024-04-06 19:26:01       38 阅读
  3. Python数据分析与可视化笔记 十 关联

    2024-04-06 19:26:01       30 阅读
  4. 数位DP模型

    2024-04-06 19:26:01       30 阅读
  5. Vue 3.0使用router

    2024-04-06 19:26:01       38 阅读
  6. vscode免费登录ssh ,linux git配置免密码

    2024-04-06 19:26:01       35 阅读
  7. vue中三种watcher

    2024-04-06 19:26:01       35 阅读
  8. 算法设计和分析1( 算法问题求解基础)

    2024-04-06 19:26:01       39 阅读