結果

問題 No.1893 Cycle
ユーザー Maeda
提出日時 2025-08-27 16:21:35
言語 Java
(openjdk 23)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 2,224 ms
コンパイル使用メモリ 76,864 KB
実行使用メモリ 46,764 KB
最終ジャッジ日時 2025-08-27 16:21:42
合計ジャッジ時間 6,372 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();
		int cycle1 = (x+4)%12;
		int cycle2 = (x+8)%12;
		if(cycle1 == y){
			System.out.println(cycle2);
		}else{
			System.out.println(cycle1);
		}
    }
}
0