結果
問題 | No.26 シャッフルゲーム |
ユーザー | ohagi_1182 |
提出日時 | 2017-10-21 14:44:47 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 357 bytes |
コンパイル時間 | 2,189 ms |
コンパイル使用メモリ | 74,036 KB |
実行使用メモリ | 54,252 KB |
最終ジャッジ日時 | 2024-05-01 09:14:03 |
合計ジャッジ時間 | 4,516 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 132 ms
41,468 KB |
testcase_01 | AC | 141 ms
41,412 KB |
testcase_02 | AC | 174 ms
42,228 KB |
testcase_03 | WA | - |
testcase_04 | AC | 147 ms
41,740 KB |
testcase_05 | WA | - |
testcase_06 | AC | 152 ms
41,812 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 171 ms
42,072 KB |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int point = n; for(int i = 0 ; i < m ; i++) { int a = sc.nextInt(); int b = sc.nextInt(); if(point == a) { point = b; } } System.out.println(point); } }