Skip to content

Commit

Permalink
Create 1032.js
Browse files Browse the repository at this point in the history
  • Loading branch information
738 committed Nov 8, 2019
1 parent cea0e31 commit be4f65a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/1032.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
let n=require('fs').readFileSync('dev/stdin').toString().trim().split('\n')
n.shift()
let tmp=n[0]
let len=tmp.length
for (let i=1; i<n.length; i++) {
let tmp2=''
for (let j=0; j<len; j++) {
if (n[i][j] === tmp[j]) {
tmp2+=n[i][j]
} else {
tmp2+='?'
}
}
tmp=tmp2
}
console.log(tmp)

0 comments on commit be4f65a

Please sign in to comment.