結果
| 問題 |
No.975 ミスターマックスバリュ
|
| ユーザー |
wonda_t_coffee
|
| 提出日時 | 2020-01-31 21:23:12 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 118 ms / 2,000 ms |
| コード長 | 254 bytes |
| コンパイル時間 | 37 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 15,744 KB |
| 最終ジャッジ日時 | 2024-09-17 07:01:48 |
| 合計ジャッジ時間 | 1,631 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
コンパイルメッセージ
Main.rb:14: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:1: warning: assigned but unused variable - n Main.rb:1: warning: assigned but unused variable - m Syntax OK
ソースコード
x, n, m = gets.chomp.split.map(&:to_i) a = gets.chomp.split.map(&:to_i) b = gets.chomp.split.map(&:to_i) f1 = a.include?(x) f2 = b.include?(x) if f1 & f2 puts 'MrMaxValu' elsif f1 & !f2 puts 'MrMax' elsif !f1 & f2 puts 'MaxValu' else puts -1 end
wonda_t_coffee