codeparrot/codecomplex huggingface dataset:
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.awt.*;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int arr[]=new int[n];
        for (int i=0;i<n;i++){
            arr[i]=sc.nextInt();
        }
        boolean vis[]=new boolean[n];
        int c=0;
        for (int i=0;i<n;i++){
            int min=200;
            for (int j=0;j<n;j++){
                if (!vis[j] && min>arr[j]){
                    min=arr[j];
                }
            }
            for (int j=0;j<n;j++){
                if (!vis[j]&&arr[j]%min==0){
                    vis[j]=true;
//                    System.out.println(arr[j]);
                }
            }
            if (min!=200){
                c++;
//                System.out.println(min+" k");
            }else break;
        }
        System.out.println(c);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;

public class A
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;

    public void go() throws IOException
    {
        ntok();
        int n = ipar();
        ArrayList<Integer> list = new ArrayList<>();
        ntok();
        for (int i = 0; i < n; i++)
        {
            list.add(ipar());
        }
        Collections.sort(list);
        HashSet<Integer> set = new HashSet<>();
        for (int x : list)
        {
            boolean add = true;
            for (int y : set)
            {
                if (x % y == 0)
                {
                    add = false;
                    break;
                }
            }
            if (add)
            {
                set.add(x);
            }
        }
        out.println(set.size());

        out.flush();
        in.close();
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public int[] iapar(int n)
    {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        return arr;
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public long[] lapar(int n)
    {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
        {
            arr[i] = lpar();
        }
        return arr;
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new A().go();
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;
public class Hack{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int[] arr = new int[n];
for(int i=0;i<n;i++)
arr[i]=sc.nextInt();
Arrays.sort(arr);
Set<Integer> set = new TreeSet<Integer>();
for(int i=0;i<n;i++){
boolean flag=false;
for(Integer x:set){
if(arr[i]%x==0){
flag=true;
break;
}
}
if(!flag)
set.add(arr[i]);
}
System.out.println(set.size());
}
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
import java.io.*;

public class paint {
	static PriorityQueue<Integer> sequence;
	
	public static void main (String [] args) throws IOException {
	    BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
	    PrintWriter out = new PrintWriter(System.out, true);
	    int numSeq = Integer.parseInt(f.readLine());
	    sequence = new PriorityQueue<Integer>();
	    
	    StringTokenizer st = new StringTokenizer(f.readLine());
	    for(int i = 0; i < numSeq; i++) {
	    	sequence.add(Integer.parseInt(st.nextToken()));
	    }
	    
	    int numColors = 0;
	    while(sequence.size() > 0) {
	    	numColors++;
	    	int smallest = sequence.poll();
	    	PriorityQueue<Integer> temp = new PriorityQueue<Integer>();
	    	for(int each: sequence) {
	    		if(each % smallest != 0) {
	    			temp.add(each);
	    		}
	    	}
	    	sequence = temp;
	    }
	    
	    System.out.println(numColors);
	    out.close();
	}
	
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;

public class Paint {
    public static void main (String srgs[] ){
        
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        TreeSet<Integer> ts=new TreeSet<>();
        for(int i=0;i<n;++i){
            ts.add(sc.nextInt());
        }
        int x=0;
        int a[]=new int[ts.size()];
        for(int y:ts){
            a[x++]=y;
        }
        for(int i=0;i<ts.size()-1;++i){
            for(int j=i+1;j<ts.size();++j){
                if((a[i]!=-1)&&(a[j]!=-1)&&(a[j]%a[i]==0)){
                    a[j]=-1;
                }
            }
        }
        int c=0;
        for(int z:a){
            if(z!=-1)++c;
        }
        System.out.print(c);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;
 
 
public class Main {
 
 
	public static void main(String[] args) throws Exception{
		BufferedReader  jk =  new BufferedReader(new InputStreamReader( System.in))  ; 
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)) ; 
		StringTokenizer ana = new StringTokenizer(jk.readLine()) ;
		int n = Integer.parseInt(ana.nextToken()) ; 
		
		int t[]= new int[101] ; 
		ArrayList<Integer> v = new ArrayList<>() ; 
		ana = new StringTokenizer(jk.readLine()) ;
		for(int i=0 ; i<n ;i++)
		{
			
			int y = Integer.parseInt(ana.nextToken()) ;
			t[y]=1 ; 
			v.add(y) ; 
		}
		Collections.sort(v);
		int c= 0; 
		for(int ele : v)
		{
			if(t[ele]==1)
			{
				
				for(int i=ele ; i<=100 ; i+=ele)
				{
					t[i]=2 ; 
				}
				c++ ; 
			}
		
		}
		out.println(c);
		
 
 
 
 
 
 
 
 
		out.flush();
	}
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader sc = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, sc, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader sc, PrintWriter out) {
            int n=sc.nextInt();
            int[] a=new int[n];
            boolean[] jud=new boolean[101];
            
            for(int i=0;i<n;i++)
            	a[i]=sc.nextInt();
            Arrays.sort(a);
            int ans=0;
            for(int i=0;i<n;i++) {
            	if(jud[a[i]])
            		continue;
            	ans++;
            	for(int j=a[i];j<=100;j+=a[i])
            		jud[j]=true;
            }
            out.println(ans);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;
 
 
public class Main {
	public static void main(String[] args) throws Exception {
		MScanner sc=new MScanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=sc.nextInt();HashSet<Integer>nums=new HashSet<Integer>();
		int[]in=new int[n];for(int i=0;i<n;i++)in[i]=sc.nextInt();
		Arrays.sort(in);
		int ans=0;
		boolean vis[]=new boolean[n];
		for(int i=0;i<n;i++) {
			if(vis[i])continue;
			for(int j=i+1;j<n;j++) {
				if(in[j]%in[i]==0) {
					vis[j]=true;
				}
			}
			ans++;
		}
		pw.println(ans);
		
		pw.flush();
	}
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
/**
 * @author Finn Lidbetter
 */
import java.util.*;
import java.io.*;
import java.awt.geom.*;

public class TaskA {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    int n = Integer.parseInt(br.readLine());
    String[] s = br.readLine().split(" ");
    int[] arr = new int[n];
    for (int i=0; i<n; i++) {
      arr[i] = Integer.parseInt(s[i]);
    }
    Arrays.sort(arr);
    boolean[] vis = new boolean[n];
    int nColours = 0;
    int nVis = 0;
    int index = 0;
    while (nVis<n) {
      while (index<n && nVis<n) {
        if (vis[index]) {
          index++;
          continue;
        }
        int val = arr[index];
        nColours++;
        while (index<n && nVis<n) {
          if (vis[index]) {
            index++;
            continue;
          }
          if (arr[index]%val==0) {
            vis[index] = true;
            nVis++;
          }
          index++;
        }
        index = 0;
      }
    }
    System.out.println(nColours);

  }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner  scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] nums = new int[n];
        for(int i = 0; i < n; i++){
            nums[i] = scan.nextInt();
        }
        Arrays.sort(nums);
        boolean[] div = new boolean[n];
        int count = 0;
        for(int i = 0; i < n; i++) {
            if (!div[i]) {

                count++;
                div[i] = true;
                for(int j = i+1; j < n; j++) {
                    if (nums[j] % nums[i] == 0) {
                        div[j] = true;
                    }
                }
            }
        }
        System.out.println(count);

    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author anand.oza
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        APaintTheNumbers solver = new APaintTheNumbers();
        solver.solve(1, in, out);
        out.close();
    }

    static class APaintTheNumbers {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();

            int[] a = in.readIntArray(n);

            Arrays.sort(a);

            int answer = 0;
            for (int i = 0; i < n; i++) {
                if (a[i] == 0)
                    continue;

                answer++;
                for (int j = 0; j < n; j++) {
                    if (j == i)
                        continue;
                    if (a[j] % a[i] == 0) {
                        a[j] = 0;
                    }
                }

                a[i] = 0;
            }

            out.println(answer);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public int[] readIntArray(int n) {
            int[] x = new int[n];
            for (int i = 0; i < n; i++) {
                x[i] = nextInt();
            }
            return x;
        }

    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.ArrayList;
import java.util.Scanner;

public class kosyaDetka {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        int t = scan.nextInt();

        ArrayList<Integer> arr = new ArrayList<>();

        for(int i = 0; i < t; i++){
            arr.add( scan.nextInt());
        }

        int count = 0;

        while (arr.size() != 0){

            int min = Integer.MAX_VALUE;

            for(int i = 0; i < arr.size(); i++){
                int temp = arr.get(i);
                if( temp < min){
                    min = temp;
                }
            }


            for(int i = 0; i < arr.size(); i++){
                int temp = arr.get(i);
                if( temp % min == 0){
                    arr.remove(i);
                    i--;
                }
            }

            count++;
        }

        System.out.println(count);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class DivRound584ProblemA {
	static FastReader sc=new FastReader();
	
	public static void main(String args[]) throws IOException {
		int n = sc.nextInt();
		
		int a[]=new int[n];
		
		for(int i=0;i<n;i++)
			a[i]=sc.nextInt();
		
		Arrays.sort(a);
		int c=0;
		for(int i=0;i<n;i++) {
			if(a[i]<0) continue;
			c=c-1;
			for(int j=i+1;j<n;j++) {
				if(a[j]<0) continue;
				if(a[j]%a[i]==0) {
					//System.out.println(a[i]+" : "+a[j]);
					a[j]=c;
				}
			}
			//System.out.println(c);
		}
		System.out.println(Math.abs(c));
	}
	
	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = sc.nextInt();
        HashSet<Integer> set = new HashSet<>();

        for (int i = 0; i < count; i++) {
            set.add(sc.nextInt());
        }

        ArrayList<Integer> list = new ArrayList<>(set);

        Collections.sort(list);

        for (int i = 0; i < list.size(); i++) {
            for (int j = i + 1; j < list.size(); j++) {

                if (list.get(i) % list.get(j) == 0 ||
                        list.get(j) % list.get(i) == 0) {
                    list.remove(j);
                    j--;
                }
            }
        }

        System.out.println(list.size());
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class Main {

    public static void main(String[] args) throws IOException {
        new Main().run();
    }


    private void run() throws IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        int n = Integer.parseInt(reader.readLine());
        int[] arr = new int[n];
        String[] line = reader.readLine().split("\\s");

        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(line[i]);
        }

        Arrays.sort(arr);

        Set<Integer> numbers = new HashSet<>();
        for (int i = 0; i < arr.length; i++) {
            Iterator<Integer> iter = numbers.iterator();
            boolean contains = false;
            while (iter.hasNext()){
                int elem = iter.next();
                if(gcd(elem, arr[i]) == elem){
                    contains = true;
                }

            }
            if(!contains)
                numbers.add(arr[i]);
        }


        System.out.println(numbers.size());

    }

    private int gcd(int a, int b){
        while (a != b){
            if(a > b)
                a -= b;
            else
                b -= a;
        }

        return a;
    }



}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;

public class cf573 {
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        int n=0;
        if(scan.hasNext())
            n=scan.nextInt();
        TreeSet<Integer> set=new TreeSet<>();
        for(int i=0;i<n;i++){
            if(scan.hasNext())
                set.add(scan.nextInt());
        }
        int[] arr=new int[set.size()];
        Iterator<Integer> it=set.iterator();
        int j=0;
        while(it.hasNext()){
            arr[j++]=it.next();
        }
        int tot=1,flag;
        for(int i=1;i<arr.length;i++){
            flag=0;
            for(int k=0;k<i;k++){
                if(arr[i]%arr[k]==0){
                    flag=1;
                    break;
                }
            }
            if(flag==0){
                tot++;
            }
        }
        System.out.println(tot);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = scn.nextInt();
        scn.close();

        Arrays.sort(a);

        ArrayList<Integer> cyka = new ArrayList<>();

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (a[j] % a[i] == 0) {
                    boolean add = true;
                    for (int k : cyka) {
                        if (a[i] % k == 0) {
                            add = false;
                            break;
                        }
                    }
                    if (add) {
                        cyka.add(a[i]);
                    }
                }
            }
        }

        System.out.println(cyka.size());

    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class A {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(reader.readLine());
        String str[] = reader.readLine().split(" ");
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(str[i]);
        }
        Arrays.sort(a);
        int k = 0;
        for (int i = 0; i < n; i++) {
            if (a[i] == 0){
                continue;
            }
            for (int j = i + 1; j < n; j++) {
                if (a[j] % a[i] == 0){
                    a[j] = 0;
                }
            }
            k++;
        }
        System.out.println(k);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
public class Paint_The_Numbers {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> paint = new ArrayList<Integer>();
		int num = scan.nextInt();
		for(int i = 0; i < num;i++)
			paint.add(scan.nextInt());
		Collections.sort(paint);
		int counter = 0;
		//System.out.println(paint);
		while(paint.size()!=0) {
			num = paint.remove(0);
			for(int i = 0; i<paint.size();i++) {
				if(paint.get(i)%num==0) {
					paint.remove(i--);
				}
			}
			counter++;
		}
		System.out.println(counter);
	}

}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;

public class code_1 {

	public static void main(String[] args) {
		
		Scanner in=new Scanner(System.in);
		
		int n=in.nextInt();
		
		int a[]=new int[n];
		
		for(int i=0;i<n;i++)
			a[i]=in.nextInt();
		
		Arrays.sort(a);
		
		for(int i=0;i<n-1;i++) {
			
			if(a[i]!=-1) {
				for(int j=i+1;j<n;j++) {
					
					if(a[j]%a[i]==0)
						a[j]=-1;
				}
			}	
		}
		
		int count=0;
		
		for(int i=0;i<n;i++) {
			
			if(a[i]!=-1)
				count++;
		}
		
		System.out.println(count);

	}

}