코이스터디 모의고사 4

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> int main(){ int N; int K; int i=1; int yaksu[10001]={0}; int bunjae=0; int gasu=0; scanf("%d %d",&N,&K); for(i=1; i<=N; i++){ if(N%i==0){ yaksu[i]=1; gasu=gasu+1; } } if(K>gasu){ printf("0"); } else{ while(1){ if(yaksu[i]==1){ bunjae=bunjae+1; if(bunjae==K){ printf("%d",i); break; } } i=i+1; } } }
Editor Settings
Theme
Key bindings
Full width
Lines