結果

問題 No.188 HAPPY DAY
ユーザー tanukidontanukidon
提出日時 2018-03-18 23:30:35
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 11,272 KB
実行使用メモリ 15,384 KB
最終ジャッジ日時 2023-08-28 18:37:05
合計ジャッジ時間 532 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:7: warning: `+' after local variable or literal is interpreted as binary operator
Main.rb:7: warning: even though it seems like unary operator
Main.rb:14: warning: `+' after local variable or literal is interpreted as binary operator
Main.rb:14: warning: even though it seems like unary operator
Main.rb:20: warning: `+' after local variable or literal is interpreted as binary operator
Main.rb:20: warning: even though it seems like unary operator
Syntax OK

ソースコード

diff #

n = [1,3,5,7,8,10,12]
m = [4,6,9,11]
c = 0
n.each do |i|
4.times do |j|
10.times do |k|
c += 1 if i  == j +k
end
end
end
m.each do |i|
4.times do |j|
10.times do |k|
c += 1 if i  == j +k
end
end
end
2.times do |j|
28.times do |k|
c += 1 if 2 == j +k
end
end
p c
0