結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
samplelpmas
|
| 提出日時 | 2017-05-07 18:19:58 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 1,000 ms |
| コード長 | 591 bytes |
| 記録 | |
| コンパイル時間 | 1,506 ms |
| コンパイル使用メモリ | 82,260 KB |
| 実行使用メモリ | 41,692 KB |
| 最終ジャッジ日時 | 2026-04-04 13:15:02 |
| 合計ジャッジ時間 | 3,363 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int students = sc.nextInt();
int groups = sc.nextInt();
int hanakoRank = sc.nextInt();
int taroRank = sc.nextInt();
if ((hanakoRank - taroRank) % (2 * groups) == 0) {
System.out.println("YES");
return;
}
if ((hanakoRank + taroRank) % (2 * groups) == 1) {
System.out.println("YES");
return;
}
System.out.println("NO");
}
}
samplelpmas