问题描述
Barua开发了自己的操作系统,称为Barua OS(BOS)。有一天,他启动他的系统,他遇到了一个错误。你想给Barua留下深刻的印象,让你自己动手解决这个问题。
Barua不太喜欢二进制数,他的操作系统使用了一个名为BNS的新数字系统(Barua数字系统) 。
以下是以BNS形式表示的数字的属性:
该数字只能由2个不同的数字组成,一个或零。
数字不能从零开始。
数字可以有任意数量的零,但只有一个数字的一个实例。
例如100,1000,10000是Barua数字,而101,502,625不是Barua数字。不幸的是,一个十进制数字已经悄悄进入Barua数字列表,而Barua OS无法找到它的产品。
我尝试过:
我只是一个初学者..帮助我
Barua has developed his own Operating System known as "Barua OS" ( BOS ). One day while booting up his system he runs into a bug. You want to impress Barua so you jump in and offer to solve the bug yourself.
Barua doesn't like binary numbers very much and his operating system uses a new number system called BNS ( Barua Number System ).
The following are the properties of a number represented in BNS form :
The number can only be made up of 2 distinct digits, one or zero.
The number cannot start with zero.
The number can have any number of zeroes, but only one instance of the digit one.
For example 100, 1000, 10000 are Barua Numbers whereas 101, 502, 625 are not Barua Numbers. Unfortunately one decimal number has crept into a list of Barua Numbers and Barua OS cannot find its product.
What I have tried:
Iam just a beginner..Help me out
推荐答案
- 检查第一个数字:必须是一个
- 如果没有剩余数字,则表示您有一个有效数字
- 检查下一个数字:必须为零
- 转到步骤2
免费做我的HomeWork,这样我就能得到你的工作,最终我会毕业,感谢你的工作。紧急
Do my HomeWork for free so that I can get credit on your work and ultimately I will graduate thanks to your work. Urgent
不,我们不做你的HomeWork。
HomeWork不会测试你的技能,乞求别人做你的工作,它是让您思考并帮助您的老师检查您对所学课程的理解以及您应用这些课程时遇到的问题。
你的任何失败都会帮助你的老师发现你的弱点并设定补救措施。
你的任何失败都会帮助你了解什么有效,什么无效,被称为'试错'学习。
所以,试一试,重读课程并开始工作。如果您遇到特定问题,请显示您的代码并解释这个问题,我们可能会提供帮助。
作为程序员,您的工作是创建算法解决特定问题,你不能依赖别人永远为你做,所以有一段时间你必须学会如何。而且越快越好。
当你要求解决方案时,就像试图通过培训其他人来学习开车一样。
创建算法基本上是找到数学并做出必要的调整以适应你的实际问题。
No, we don't do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
Any failure of you will help you to learn what works and what don't, it is called 'trial and error' learning.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.
这篇关于C程序在barua OS中找到bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!