Challenge
Careers
Class
Connect
로그인 후 문제풀이가 가능합니다.
테케 4, 8, 10, 11 에서 틀렸습니다가 나오는데 이유를 모르겠어요. 도움부탁드립니다.
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][] arrs = new int[3][3]; for (int i = 0; i < 3; i++) { StringTokenizer st = new StringTokenizer(br.readLine()); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); int c = Integer.parseInt(st.nextToken()); a...
4, 7, 8, 10, 11 에서 오류가 나는 이유가 뭘까요..?
const readline = require("readline") const rl = readline.createInterface({ input: process.stdin, output: process.stdout }) let input = [] rl.on("line", (line) => { input.push(line) }).on("close", ()=> { const graph = [] for(let i=0; i<3; i++) { graph.push(input[i].split(" ").map(Number)) } let group = [] // 가로 for(let i=0; i<3; i++) { group.push(graph[i]) } // 세로 for(let i=0; i<3; i++) { group.push([graph[0][i],graph[1][i],graph[2][i]]) } let answer = 1e9 for(let g of group) { let result = ne...
테케 4번..
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[][] map = new int[3][3]; StringTokenizer st; for(int i=0; i<3; i++) { st = new StringTokenizer(br.readLine()); for(int j=0; j<3; j++){ map[i][j] = Integer.parseInt(st.nextToken()); } ...
반례좀 알려주세용
const input = require('fs').readFileSync(0).toString().trim().split('\n') const arrRow = input.map(item=> item.split(' ').map(Number)) let arrCol = [[],[],[]] for (let i = 0; i < arrRow.length; i++) { arrCol[0].push(arrRow[i][0]) arrCol[1].push(arrRow[i][1]) arrCol[2].push(arrRow[i][2]) } function add(arr){ let countArr = [] for (let i = 0; i < 3; i++) { let count1 = 0; let count2 = 0; let count3 = 0; for (let j = 0; j < 3; j++) { ...