当前位置:网站首页>华为od 转骰子 js
华为od 转骰子 js
2022-07-31 01:18:00 【大鸡腿最好吃】
标题:转骰子 | 时间限制:1秒 | 内存限制:262144K | 语言限制:不限
骰子是一个立方体,每个面一个数字,初始为左1,右2,前3(观察者方向),后4,上5,下6,用123456表示这个状态,放置到平面上,可以向左翻转(用L表示向左翻转1次),可以向右翻转(用R表示向右翻转1次),可以向前翻转(用F表示向前翻转1次),可以向后翻转(用B表示向后翻转1次),可以逆时针旋转(用A表示逆时针旋转90度),可以顺时针旋转(用C表示顺时针旋转90度),现从123456这个初始状态开始,根据输入的动作序列,计算得到最终的状态。
骰子的初始状态和初始状态转动后的状态如图所示
输入描述:
输入一行,为只包含LRFBAC的字母序列,最大长度50,字母可重复
输出描述:
输出最终状态
示例1
输入
LR
输出
123456
说明
骰子先向左翻转,再向右翻转回来,故还是原来的状态123456
示例2
输入
FCR
输出
342156
let s
边栏推荐
- 网站频繁出现mysql等数据库连接失败等信息解决办法
- typescript16-void
- RTL8720DN开发笔记一 环境搭建与mqtt实例
- Typescript14 - (type) of the specified parameters and return values alone
- ROS Action communication
- System design. Short chain system design
- Huawei's "genius boy" Zhihui Jun has made a new work, creating a "customized" smart keyboard from scratch
- MySQL database (basic)
- typescript15- (specify both parameter and return value types)
- "Real" emotions dictionary based on the text sentiment analysis and LDA theme analysis
猜你喜欢
JPEG Steganalysis of Digital Image Steganography
分布式.幂等性
Analyze the capabilities and scenarios of the cloud native message flow system Apache Pulsar
剑指offer17---打印从1到最大的n位数
I have been working in software testing for 3 years, how did I go from just getting started to automated testing?
Mysql systemized JOIN operation example analysis
Rocky/GNU之Zabbix部署(2)
typescript15-(同时指定参数和返回值类型)
ShardingSphere之未分片表配置实战(六)
使用PageHelper实现分页查询(详细)
随机推荐
倍增、DFS序
ECCV 2022 华科&ETH提出首个用于伪装实例分割的一阶段Transformer的框架OSFormer!代码已开源!
Parameter introduction and selection points of wireless module
typescript12-联合类型
PDF 拆分/合并
使用PageHelper实现分页查询(详细)
深度学习可以求解特定函数的参数么?
TypeScript在使用中出现的问题记录
调度中心xxl-Job
typescript17-函数可选参数
射频器件的基本参数1
剑指offer17---打印从1到最大的n位数
The Meta Metaverse Division lost 2.8 billion in the second quarter, still want to continue to bet?Metaverse development has yet to see a way out
九州云获评云计算标准化优秀成员单位
TiCDC 架构和数据同步链路解析
Rocky/GNU之Zabbix部署(1)
tensorflow与GPU版本对应安装问题
"Real" emotions dictionary based on the text sentiment analysis and LDA theme analysis
Unity2D horizontal version game tutorial 4 - item collection and physical materials
822. 走方格