結果

問題 No.687 E869120 and Constructing Array 1
ユーザー G2G2
提出日時 2018-05-27 02:07:14
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 357 bytes
コンパイル時間 3,592 ms
コンパイル使用メモリ 74,900 KB
実行使用メモリ 57,052 KB
最終ジャッジ日時 2023-09-11 03:47:08
合計ジャッジ時間 6,059 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 158 ms
56,932 KB
testcase_01 AC 159 ms
56,668 KB
testcase_02 AC 158 ms
56,404 KB
testcase_03 AC 159 ms
56,580 KB
testcase_04 AC 159 ms
56,568 KB
testcase_05 AC 156 ms
56,948 KB
testcase_06 AC 157 ms
54,708 KB
testcase_07 AC 155 ms
56,520 KB
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.Random;
public class no687 {
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int num = s.nextInt();
		Random rand = new Random();
		int a = rand.nextInt(num);
		if(a==0){
			a=1;
		}else if(a>10){
			a = rand.nextInt(10)+1;
		}
		int b = num -a;
		System.out.println(a+" "+b);
	}
}
0