模拟放射性衰变 [英] Simulate radioactive decay

查看:170
本文介绍了模拟放射性衰变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

输入:大量(10,000到100,000)和概率。<​​br />


输出:概率输入是物质的任何给定原子放射性衰变的概率在一定时间内。输出现有原子的1秒时间间隔,直到给定物质达到原始量的1/16。



代码使用java会是什么?



我尝试了什么:



我不知道该怎么做。我希望方法使用math.random。

Input: A large number ( 10,000 to 100,000) and a probability.

Output: The probability input is the probability that any given atom of a substance radioactively decays in a given second. Output 1 second time intervals of the existing atom until the given substance has reached 1/16 of its original amount.

What would the code be using java?

What I have tried:

I don't know what to do. I want the approach to use math.random.

推荐答案

Quote:

I希望这种方法能够使用math.random。

I want the approach to use math.random.

这是明智的。

现在考虑一个原子。如果你提取一个随机数 r (记住 0 = r< 1 ),可能会发生两件事,

That's wise.
Now consider a single atom. If you extract a random number r ( remember 0 = r < 1 ) the two things may happen, either

  1. r< p






or

  1. r> = p





如果情况(1)原子衰减,如果情况(2)原子幸存下来。



这很简单,不是吗?



In case (1) the atom decays, in case (2) the atom survives.

It's simple enough, isn't it?


引用:

我不知道该怎么做。我希望这种方法能够使用math.random。

I don't know what to do. I want the approach to use math.random.



你应该研究放射性衰变是如何工作的,这里没有随机的东西。


You should study how radioactibity decay works, there is nothing random here.

引用:

代码使用java会是什么?

What would the code be using java?



这里我们帮您修复代码,我们不做你的作业。



我们不做你的家庭作业。

HomeWork不会测试你的技能乞求其他人做你的工作,它会让你思考并帮助你的老师检查你对所学课程的理解,以及你应用它们时遇到的问题。

你的任何失败都会帮助你的老师发现你的弱点并设定补救措施。

你的任何失败都会帮助你了解什么有效,什么无效,被称为'试错'学习。

所以,试一试,重读课程并开始工作。如果您遇到特定问题,请展示您的代码并解释这个问题,我们可能会提供帮助。


Here we help you fix your code, we don't do your homework.

We do not 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.


这篇关于模拟放射性衰变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆