가나다라

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록
  • 관리

codefight 4

modulo power (지수가 지수형태일 때)

https://codefights.com/forum/kk5YnGxknN9MtD2kF a, n 이 a, n

카테고리 없음 2016.09.03

GCD

while (t > 0) t = s % (s = t);위 while 루프를 수행후에s 값에는 while 루프를 수행하기 직전의 s, t의 GCD가 저장된다.

카테고리 없음 2015.03.18

powerOfTwo

106 Chrs int i,s=1; int[] powerOfTwo(int N) { int[] a = new int[Long.bitCount(N)]; for (;s>0;s*=2) if (0 < (N & s)) a[i++]=s; return a; } 112 Chrs int[] powerOfTwo(int N) { int i=0,s=1,c=Long.bitCount(N); int[] a = new int[c]; for (;i0;) N-=a[i++] = Integer.lowestOneBit(N); return a; }

카테고리 없음 2015.03.17

fibonacciSum

int s,x,y,k; int[] fibonacciSum(int N) { int[] z,r; z = new int[N]; for (;N > 0;N-=z[s++]=x) for (x=y=1; N >= y; y += x, x = y - x); r = new int[s]; for (;k

카테고리 없음 2015.03.17
이전
1
다음
더보기
프로필사진

가나다라

  • 분류 전체보기 (55)
    • Java Android (2)
    • iOS Mac OS (1)
    • 지름 (0)
    • 홈런 배틀 (1)
    • goclassic (0)
    • 내가만든것들 (0)
    • database (1)
    • vim (1)
    • 저런거 (0)
    • 단어장 (0)
    • 분류 미정 (2)
    • 개스토리 (1)

Tag

Nginx, 에빙하우스, Batch, modulo, oracle, ffmpeg, Number Theory, Winterreise, DOS, 겨울나그네, 암기, binary search, codefight, exponent, variable, lower_bound, coding, ORA-28000, upper_bound, LOCK,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

  • 알립니다.

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

  • 개스토리 로그인

티스토리툴바