結果

問題 No.216 FAC
ユーザー LEDLED
提出日時 2019-02-01 19:36:00
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 184 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 11,236 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2023-08-15 15:39:27
合計ジャッジ時間 3,669 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,256 KB
testcase_01 AC 78 ms
15,260 KB
testcase_02 AC 79 ms
15,356 KB
testcase_03 AC 79 ms
15,352 KB
testcase_04 AC 86 ms
15,144 KB
testcase_05 AC 79 ms
15,244 KB
testcase_06 AC 77 ms
15,088 KB
testcase_07 AC 77 ms
15,100 KB
testcase_08 AC 77 ms
15,140 KB
testcase_09 AC 77 ms
15,240 KB
testcase_10 AC 77 ms
15,148 KB
testcase_11 AC 77 ms
15,076 KB
testcase_12 AC 79 ms
15,132 KB
testcase_13 AC 78 ms
15,176 KB
testcase_14 AC 77 ms
15,292 KB
testcase_15 AC 77 ms
15,032 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 78 ms
15,156 KB
testcase_19 AC 77 ms
15,160 KB
testcase_20 AC 77 ms
15,112 KB
testcase_21 AC 77 ms
15,308 KB
testcase_22 AC 77 ms
15,156 KB
testcase_23 AC 78 ms
15,264 KB
testcase_24 AC 78 ms
15,224 KB
testcase_25 AC 77 ms
15,160 KB
testcase_26 AC 76 ms
15,016 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n=gets.to_i
a=gets.split.map(&:to_i)
b=gets.split.map(&:to_i)
t=a.zip(b).inject([0,0]){|s,e|e[1]==0 ? [s[0]+e[0],s[1]] : [s[0],s[1]<e[0] ? e[0] : s[1]]}
puts t[0]>=t[1] ? "YES" : "NO"
0