Submission #4114155


Source Code Expand

Copy
N = gets.to_i
A = gets.to_s.chars
B = gets.to_s.chars
C = gets.to_s.chars

n = N.to_i
ans = 0

n.times do |i|
    ca, cb, cc = A[i], B[i], C[i]
    ans += 1 if ca != cb
    ans += 1 if cb != cc
    ans -= 1 if (ca != cb) && (cb != cc) && (ca == cc) 
end

p ans

Submission Info

Submission Time
Task B - Touitsu
User yokoyan
Language Ruby (2.3.3)
Score 200
Code Size 275 Byte
Status
Exec Time 7 ms
Memory 1788 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 a01, a02, a03
All 200 / 200 a01, a02, a03, b04, b05, b06, b07, b08, b09, b10
Case Name Status Exec Time Memory
a01 7 ms 1788 KB
a02 7 ms 1788 KB
a03 7 ms 1788 KB
b04 7 ms 1788 KB
b05 7 ms 1788 KB
b06 7 ms 1788 KB
b07 7 ms 1788 KB
b08 7 ms 1788 KB
b09 7 ms 1788 KB
b10 7 ms 1788 KB