(JAVA保留小数问题,基础)Probability hdu2131
2021-06-28 23:04
标签:hal font win alc nsca app limit nta blank 链接:http://acm.hdu.edu.cn/showproblem.php?pid=2131 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 注: 此题是java水题,注意要int与double进行转换。 (JAVA保留小数问题,基础)Probability hdu2131 标签:hal font win alc nsca app limit nta blank 原文地址:https://www.cnblogs.com/Weixu-Liu/p/9648221.htmlProbability
Total Submission(s): 8731 Accepted Submission(s): 4228import java.math.BigDecimal;
import java.util.Scanner;
import javax.swing.plaf.basic.BasicArrowButton;
public class Main {
public static void main(String[] args) {
Scanner inScanner = new Scanner(System.in);
while(inScanner.hasNext()) {
String string = inScanner.next();
String string2 = inScanner.next();
string = string.toLowerCase();
string2 = string2.toLowerCase();
char c = string.charAt(0);
int number = 0;
BigDecimal bigDecimal = BigDecimal.valueOf(0);
for(int i = 0;i
文章标题:(JAVA保留小数问题,基础)Probability hdu2131
文章链接:http://soscw.com/essay/99094.html