- /** * Created by Ukiy on 2017/1/3. */
- import java.math. * ;
- import java.util. * ;
- public class temp2 {
- public static void main(String[] args) {
- Scanner cin = new Scanner(System. in );
- GregorianCalendar t = new GregorianCalendar();
- long time = cin.nextLong();
- t.setTimeInMillis(time);
- System.out.println(t.get(Calendar.YEAR) + "-" + t.get(Calendar.MONTH) + "-" + t.get(Calendar.DAY_OF_MONTH));
- }
- }
- /** * Created by Ukiy on 2017/1/3. */
- import java.math. * ;
- import java.util. * ;
- public class Main {
- public static void main(String[] args) {
- Scanner cin = new Scanner(System. in );
- int a = cin.nextInt();
- BigInteger x = BigInteger.ONE;
- for (int i = 2; i <= a; i++) {
- x = x.multiply(BigInteger.valueOf(i));
- }
- System.out.println(x);
- }
- }
输入样例:
9223372036854775839 2
- /** * Created by Ukiy on 2017/1/4. */
- import java.math. * ;
- import java.util. * ;
- public class temp3 {
- public static void main(String[] args) {
- Scanner cin = new Scanner(System. in );
- BigInteger m = cin.nextBigInteger();
- int n = cin.nextInt();
- while (n > 0) {
- if (m.isProbablePrime(100)) {
- System.out.println(m);
- n--;
- }
- m = m.nextProbablePrime();
- }
- cin.close();
- }
- }
就爱阅读 www.92to.com 网友整理上传, 为您提供最全的知识大全, 期待您的分享,转载请注明出处。
来源: