結果

問題 No.2297 Best Grouping
ユーザー YGBKYGBK
提出日時 2023-05-15 18:14:32
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 3,172 ms
コンパイル使用メモリ 72,496 KB
実行使用メモリ 56,192 KB
最終ジャッジ日時 2023-08-20 19:08:17
合計ジャッジ時間 7,304 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
55,700 KB
testcase_01 WA -
testcase_02 AC 100 ms
55,456 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 100 ms
55,548 KB
testcase_06 WA -
testcase_07 AC 103 ms
55,776 KB
testcase_08 AC 102 ms
55,528 KB
testcase_09 AC 100 ms
55,540 KB
testcase_10 AC 101 ms
55,664 KB
testcase_11 AC 100 ms
55,904 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 100 ms
55,660 KB
testcase_16 AC 102 ms
55,528 KB
testcase_17 AC 100 ms
55,508 KB
testcase_18 AC 100 ms
55,924 KB
testcase_19 AC 100 ms
53,932 KB
testcase_20 AC 99 ms
55,460 KB
testcase_21 AC 99 ms
56,000 KB
testcase_22 AC 99 ms
55,372 KB
testcase_23 AC 99 ms
55,532 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 == 3)	System.out.println(1);

		sc.close();
	}

}
0