結果

問題 No.1893 Cycle
ユーザー sysnote8main
提出日時 2023-05-07 19:34:33
言語 Java
(openjdk 23)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 628 bytes
コンパイル時間 3,598 ms
コンパイル使用メモリ 74,260 KB
実行使用メモリ 43,064 KB
最終ジャッジ日時 2024-11-24 18:45:58
合計ジャッジ時間 6,772 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class GetPointOnCircle {
    public static void log(Object obj) {
        System.out.println(obj.toString());
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if(a>b) {
            int g = b;
            b=a;
            a=g;
        }
        int out = 0;
        if(4<=a) {
            out = a-4;
        } else if(a+4==b){
            out = b+4;
        } else {
            out = a+4;
        }
        if(out==12) {
            out = 0;
        }
        log(out);
    }
}

0