洛谷P1000超级玛丽游戏题解[Python, Rust, Go]

题目

打印超级玛丽字符图像

小技巧

直接复制题目的超级玛丽符号首行会有空格问题,一直AC不过,一行一行地复制就OK了👌。

Rust 题解

rust 复制代码
fn main() {
    println!(
        "                ********
               ************
               ####....#.
             #..###.....##....
             ###.......######              ###            ###
                ...........               #...#          #...#
               ##*#######                 #.#.#          #.#.#
            ####*******######             #.#.#          #.#.#
           ...#***.****.*###....          #...#          #...#
           ....**********##.....           ###            ###
           ....****    *****....
             ####        ####
           ######        ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
##########################################    #----------#
#.....#......##.....#......##.....#......#    #----------#
##########################################    #----------#
#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#
##########################################    ############"
    );
}

Python 题解

python 复制代码
print('''                ********
               ************
               ####....#.
             #..###.....##....
             ###.......######              ###            ###
                ...........               #...#          #...#
               ##*#######                 #.#.#          #.#.#
            ####*******######             #.#.#          #.#.#
           ...#***.****.*###....          #...#          #...#
           ....**********##.....           ###            ###
           ....****    *****....
             ####        ####
           ######        ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
##########################################    #----------#
#.....#......##.....#......##.....#......#    #----------#
##########################################    #----------#
#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#
##########################################    ############''')

Go题解

go 复制代码
package main

import "fmt"

func main() {
	mali := `                ********
               ************
               ####....#.
             #..###.....##....
             ###.......######              ###            ###
                ...........               #...#          #...#
               ##*#######                 #.#.#          #.#.#
            ####*******######             #.#.#          #.#.#
           ...#***.****.*###....          #...#          #...#
           ....**********##.....           ###            ###
           ....****    *****....
             ####        ####
           ######        ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
##########################################    #----------#
#.....#......##.....#......##.....#......#    #----------#
##########################################    #----------#
#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#
##########################################    ############`
	fmt.Println(mali)
}

来源:洛谷-P1000 超级玛丽游戏

相关推荐
@zulnger1 分钟前
WebDriver API及对象识别技术
笔记·python·selenium
Wonderful U15 分钟前
基于Python+Django的文件预览与转换系统:从架构设计到完整实现
后端·python·django
copyer_xyf28 分钟前
Python 类全面总结
前端·后端·python
copyer_xyf32 分钟前
Python 类型注解:从 TypeScript 迁移理解
前端·后端·python
276695829232 分钟前
谷歌google cookie逆向角度分析
开发语言·python·google·sgss·谷歌搜索·sg-ss·谷歌cookie逆向
copyer_xyf39 分钟前
Python 函数全面总结
前端·后端·python
zmzb010340 分钟前
Python课后习题训练记录Day123
开发语言·python
PersistJiao42 分钟前
python环境下免费、专业的中英翻译
开发语言·windows·python·机器翻译
Pocker_Spades_A1 小时前
[鸿蒙PC命令行移植适配]移植rust三方库erdtree到鸿蒙PC的完整实践
华为·rust·harmonyos