📢 공지합니다
이 게시글은 메인 페이지에 항상 고정되어 표시됩니다.
https://www.acmicpc.net/problem/1283 N = gets.chomp.to_ilist = []alphabet = Array.new(26, false)# 입력 받으면서 해결for start in 0..N - 1 str = gets.chomp.to_s flag = false splitFlag = false bigStr = false # 공백 구분 str_split = str.split(' ') # 첫글자 공략 공백 돌기 for i in 0..str_split.length - 1 if !splitFlag resultStr = "" # 첫글자 있는지 확인 strSplit = str_split[i] if strSplit[0] >= 'A..
https://www.acmicpc.net/problem/1205 # frozen_string_literal: trueN, S, P = gets.chomp.split.map(&:to_i)score = []if N != 0 score = gets.chomp.split.map(&:to_i)endif P != 0 index_of = 1else index_of = 0endcnt = 0if score.index(S).nil? for i in 0...N cnt += 1 if S > score[i] index_of = cnt break end if i == N - 1 if cnt + 1 = P index_of = -1elsif S == score[N - 1] ..