結果
問題 | No.975 ミスターマックスバリュ |
ユーザー | C_nena_E |
提出日時 | 2020-01-31 21:25:16 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 854 bytes |
コンパイル時間 | 2,380 ms |
コンパイル使用メモリ | 81,412 KB |
実行使用メモリ | 61,680 KB |
最終ジャッジ日時 | 2023-10-17 08:37:29 |
合計ジャッジ時間 | 5,227 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 138 ms
57,584 KB |
testcase_01 | AC | 141 ms
57,132 KB |
testcase_02 | AC | 142 ms
57,788 KB |
testcase_03 | AC | 151 ms
57,728 KB |
testcase_04 | RE | - |
testcase_05 | AC | 171 ms
57,612 KB |
testcase_06 | AC | 193 ms
57,692 KB |
testcase_07 | AC | 198 ms
57,960 KB |
testcase_08 | AC | 318 ms
61,680 KB |
testcase_09 | AC | 138 ms
57,688 KB |
testcase_10 | AC | 142 ms
57,172 KB |
ソースコード
import java.util.*; import java.io.*; import java.math.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int m = sc.nextInt(); String ans = ""; for(int i = 0; i < n; i++){ if(x == sc.nextInt()){ ans += "MrMax"; break; } } for(int i = 0; i < n; i++){ if(x == sc.nextInt()){ if(!ans.isEmpty()){ ans += "Valu"; }else{ ans += "MaxValu"; } break; } } if(!ans.isEmpty()){ System.out.println(ans); }else{ System.out.println(-1); } } }