代码拉取完成,页面将自动刷新
package Algorithm.math;
import Common.Constant.C;
import Common.Utils.UTFactory;
import DataStructure.list.Nodelj;
import org.junit.Test;
import static Common.Utils.Tools.strTools;
/**
* @author 蔚蔚樱
* @version V1.0
* @date 2022/11/21 13:13
* @author—Email micromicrohard@outlook.com
* @blogURL https://blog.csdn.net/Micro_Micro_Hard
* @description 最小公倍数
* Tips: 相乘然后除以 最大公约数
* @blogURL
*/
public class LeastCommonMultiple {
@Test // 验证功能:从数据库获取测试数据,用于单元测试
public void TestFunc() throws Exception {
UTFactory.FullTest(this.getClass());
}
@Test // 调试功能 : 用于复现错误的测试案例
public void DoubleTrack() throws Exception {
String input = strTools.ConcatMultiParams("4", "3");
String output = "12";
UTFactory.DebugTest(this.getClass(), input, output);
}
public int Method(int a, int b) {
if (a < 0 || b < 0) {
return C.ErrorNum;
}
GreatestCommonDivisor tools = new GreatestCommonDivisor();
int temp = tools.Method(a, b);
if (temp <= 0) {
return C.ErrorNum;
}
return a * b / temp;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。