結果

問題 No.2297 Best Grouping
ユーザー YGBK
提出日時 2023-05-15 18:15:51
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 3,345 ms
コンパイル使用メモリ 78,588 KB
実行使用メモリ 41,796 KB
最終ジャッジ日時 2024-11-30 23:04:43
合計ジャッジ時間 7,488 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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