結果

問題 No.2297 Best Grouping
ユーザー YGBKYGBK
提出日時 2023-05-15 18:15:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 4,265 ms
コンパイル使用メモリ 72,512 KB
実行使用メモリ 56,424 KB
最終ジャッジ日時 2023-08-20 19:08:44
合計ジャッジ時間 6,133 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
56,008 KB
testcase_01 AC 103 ms
55,892 KB
testcase_02 AC 100 ms
56,040 KB
testcase_03 AC 104 ms
55,716 KB
testcase_04 AC 102 ms
55,696 KB
testcase_05 AC 104 ms
55,928 KB
testcase_06 AC 104 ms
55,872 KB
testcase_07 AC 105 ms
56,424 KB
testcase_08 AC 102 ms
55,888 KB
testcase_09 AC 104 ms
56,044 KB
testcase_10 AC 105 ms
55,920 KB
testcase_11 AC 107 ms
56,244 KB
testcase_12 AC 106 ms
55,804 KB
testcase_13 AC 107 ms
55,780 KB
testcase_14 AC 101 ms
56,044 KB
testcase_15 AC 103 ms
55,708 KB
testcase_16 AC 103 ms
55,824 KB
testcase_17 AC 101 ms
55,732 KB
testcase_18 AC 102 ms
56,248 KB
testcase_19 AC 102 ms
55,804 KB
testcase_20 AC 101 ms
56,120 KB
testcase_21 AC 102 ms
53,884 KB
testcase_22 AC 103 ms
56,132 KB
testcase_23 AC 104 ms
55,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class MyMain {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());

		if (n % 3 == 0)	System.out.println(0);
		if (n % 3 == 1)	System.out.println(2);
		if (n % 3 == 2)	System.out.println(1);

		sc.close();
	}

}
0