Java??ACM?е????
???????????? ???????[ 2014/2/21 11:50:31 ] ???????????? ???????
????1?????????
import java.oi.*;
import java.util.*
public class Main
{
public static void main(String args[])
{
Scanner cin = new Scanner(System.in));
}
}
|
????2??Java??????
???????????????int n = cin.nextInt();
????????scanf("%d"?? &n);?? cin >> n;
????????????????String s = cin.next();
????????scanf("%s"?? s);?? cin >> s;
?????????????????double t = cin.nextDouble();
????????scanf("%lf"?? &t); ?? cin >> t;
???????????:String s = cin.nextLine();
????????gets(s);?? cin.getline(...);
?????ж???????????????????? cin.hasNext() ?? cin.hasNextInt() ?? cin.hasNextDouble()
????3??Java?????
?????????????????? System.out.print() ?? System.out.println()????????????У????????????
????System.out.printf()????÷?????????C?????printf();
????4???????????
import java.text.*;
public class Main
{
public static void main(String[] args)
{
DecimalFormat g = new DecimalFormat("0.00");
double a = 123.45678;
System.out.println(g.format(a));
}
}
|
????//????123.46
????5??Java??????
import java.math.* // ??????? java.math ??
BigInteger a = BigInteger.valueOf(100);
BigInteger b = BigInteger.valueOf(50);
BigInteger c = a.add(b) // c = a + b;
//????????·???????????
BigInteger add(BigInteger other)
BigInteger subtract(BigInteger other)
BigInteger multiply(BigInteger other)
BigInteger divide(BigInteger other)
BigInteger mod(BigInteger other)
int compareTo(BigInteger other)
static BigInteger valueOf(long x)
|
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11