본문 바로가기

전체 글311

70] Leetcode 1929. Concatenation of Array int 배열을 두번 써주면 된다. class Solution { fun getConcatenation(nums: IntArray): IntArray { val ans = IntArray(nums.size *2 ) for (i in nums.indices) { ans[i] = nums[i]; ans[i+ nums.size] = nums[i]; } return ans; } } . class Solution { fun getConcatenation(nums: IntArray): IntArray { val size = nums.size val concatenationArray = IntArray(size * 2) for (i in nums.indices) { concatenationArray[i] = nums[.. 2023. 4. 3.
플레이스토어] 출시하고 출시 노트 수정하기 버전 세부정보 수정으로 수정가능하다. 2023. 3. 30.
69] 프로그래머스 제곱수 판별하기 Kotlin https://school.programmers.co.kr/learn/courses/30/lessons/120909 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr import kotlin.math.* class Solution { fun solution(n: Int): Int { var answer: Int = 0 val a = sqrt(n.toDouble()) // 정수 판별 if(a % 1 == 0.0){ answer = 1 } else { answer = 2 } return answer } } import kotlin.math.* 2023. 3. 21.
68] 프로그래머스 세균 증식 Kotlin https://school.programmers.co.kr/learn/courses/30/lessons/120910 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr import kotlin.math.pow class Solution { fun solution(n: Int, t: Int): Int { var answer: Int = 0 // 시간당 늘어나는 세균 수 // int를 double로, double에서 int로 형변환 필요 answer = 2.toDouble().pow(t).toInt() // 초기 세균수에 곱하기 answer *= n return .. 2023. 3. 20.
Android] Postman에서 Fcm 푸쉬 보내기 https://fcm.googleapis.com/fcm/send Content-Type, Authorization 넣고 Authorization에는 key = to에는 로그에서 확인 가능한 파이어베이스 토큰넣고, notification으로 감싸주어야 안드로이드는 백그라운드에서도 onMessageReceived 함수가 먹음 2023. 3. 16.
Android] Sms 자동입력 Java 버전 메시지 내용은 로 시작. 메시지 내용은 140 byte 이하. 11자리 Hash Key 로 끝나야 . [Android] SMS 자동으로 읽어오기 SMS 인증번호를 읽어와 자동 입력하기 2018년 10월에 구글에서 공지한 '통화 기록 및 SMS 사용 권한 제한'에 따라 2019년 1월부터 '통화 기록 및 SMS 사용 권한 제한' 정책은 전화나 문자를 주 기능으로 linitial.tistory.com gradle 추가 implementation 'com.google.android.gms:play-services-auth:20.2.0' implementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1' 인증번호 버튼 클릭시 public voi.. 2023. 3. 8.