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


public class Main {

    static StringBuilder data = new StringBuilder();
    final static FastReader in = new FastReader();


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


    static void fileOut(String s) {
        File out = new File("output.txt");
        try {
            FileWriter fw = new FileWriter(out);
            fw.write(s);
            fw.flush();
            fw.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        public FastReader(String path) {
            try {
                br = new BufferedReader(new
                        InputStreamReader(new FileInputStream(path)));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        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());
        }

        float nextFloat() {
            return Float.parseFloat(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.Arrays;
import java.util.Scanner;

public class first {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int[] a=new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i]=s.nextInt();
		}
		Arrays.sort(a);
		int count=0;
		for (int i = 0; i < a.length; i++) {
			if(a[i]!=0) {
				int x=a[i];
				count++;
				for (int j = i; j < a.length; j++) {
					if(a[j]%x==0) {
						a[j]=0;
					}
				}
			}
		}
		System.out.println(count);
	}

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

public class PaintTheNumbers {
    public static void main(String[] args) throws IOException {
        int[] colors = new int[101];
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(f.readLine());
        int N = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(f.readLine());
        for (int i = 0; i < N; i++) {
            colors[Integer.parseInt(st.nextToken())]++;
        }
        int colorCount = 0;
        for (int i = 1; i <= 100; i++) {
            if (colors[i] != 0) {
                colors[i] = 0;
                for (int multiple = 2; multiple * i <= 100; multiple++) {
                    colors[i*multiple] = 0;
                }
                colorCount++;
            }
        }
        System.out.println(colorCount);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;

public class TaskA {

    public static void main(String[] args) {
        FastReader in = new FastReader(System.in);
//        FastReader in = new FastReader(new FileInputStream("input.txt"));
        PrintWriter out = new PrintWriter(System.out);
//        PrintWriter out = new PrintWriter(new FileOutputStream("output.txt"));


        int n = in.nextInt();

        int[] a = new int[n];

        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        Arrays.sort(a);

        int ans = 1;
        for (int i = 1; i < n; i++) {
            boolean bb = false;
            for (int j = i - 1; j >= 0; j--) {
                if (a[i] % a[j] == 0) {
                    bb = true;
                    break;
                }
            }
            if (!bb) ans++;
        }

        out.println(ans);





        out.close();
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

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

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

        Double nextDouble() {
            return Double.parseDouble(next());
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }

        String nextLine() {
            String s = "";
            try {
                s = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return s;
        }
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.*;
import java.math.BigInteger;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class A extends PrintWriter {

    void run() {
        int n = nextInt();
        int m = 101;
        boolean[] c = new boolean[m];

        for (int i = 0; i < n; i++) {
            int v = nextInt();
            c[v] = true;
        }

        int ans = 0;

        for (int v = 1; v < m; v++) {
            if (c[v]) {
                ++ans;
                for (int u = v; u < m; u += v) {
                    c[u] = false;
                }

            }
        }

        println(ans);

    }

    boolean skip() {
        while (hasNext()) {
            next();
        }
        return true;
    }

    int[][] nextMatrix(int n, int m) {
        int[][] matrix = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                matrix[i][j] = nextInt();
        return matrix;
    }

    String next() {
        while (!tokenizer.hasMoreTokens())
            tokenizer = new StringTokenizer(nextLine());
        return tokenizer.nextToken();
    }

    boolean hasNext() {
        while (!tokenizer.hasMoreTokens()) {
            String line = nextLine();
            if (line == null) {
                return false;
            }
            tokenizer = new StringTokenizer(line);
        }
        return true;
    }

    int[] nextArray(int n) {
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = nextInt();
        }
        return array;
    }

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

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

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException err) {
            return null;
        }
    }

    public A(OutputStream outputStream) {
        super(outputStream);
    }

    static BufferedReader reader;
    static StringTokenizer tokenizer = new StringTokenizer("");
    static Random rnd = new Random();
    static boolean OJ;

    public static void main(String[] args) throws IOException {
        OJ = System.getProperty("ONLINE_JUDGE") != null;
        A solution = new A(System.out);
        if (OJ) {
            reader = new BufferedReader(new InputStreamReader(System.in));
            solution.run();
        } else {
            reader = new BufferedReader(new FileReader(new File(A.class.getName() + ".txt")));
            long timeout = System.currentTimeMillis();
            while (solution.hasNext()) {
                solution.run();
                solution.println();
                solution.println("----------------------------------");
            }
            solution.println("time: " + (System.currentTimeMillis() - timeout));
        }
        solution.close();
        reader.close();
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
import java.io.*;
import java.math.*;

public class Es1
{
    static IO io = new IO();
    public static void main(String[] args)
    {
		int n = io.getInt();
		int[] a = new int[n];
		for(int i=0; i<n; i++)
			a[i] = io.getInt();
		
		Arrays.sort(a);
		int[] color = new int[n];
		int num = 1;
		for(int i=0; i<n; i++){
			if(color[i]==0){
				for(int j=i+1; j<n; j++){
					if(a[j]%a[i]==0)
						color[j] = num;
				}
				num++;
			}
		}
		
		io.println(num-1);

		
		
		
        io.close();
    }
}



class IO extends PrintWriter {
	public IO() {
        super(new BufferedOutputStream(System.out));
        r = new BufferedReader(new InputStreamReader(System.in));
    }

    public IO(String fileName) {
        super(new BufferedOutputStream(System.out));
        try{
            r = new BufferedReader(new FileReader(fileName));
        } catch (FileNotFoundException e) {
            this.println("File Not Found");
        }
    }

    public boolean hasMoreTokens() {
        return peekToken() != null;
    }

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

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

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

    public String getWord() {
        return nextToken();
    }

	public String getLine(){
        try{
            st = null;
            return r.readLine();
        }
        catch(IOException ex){}
        return null;
    }
	

    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
        if (token == null)
            try {
                while (st == null || !st.hasMoreTokens()) {
                    line = r.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                }
                token = st.nextToken();
            } catch (IOException e) { }
        return token;
    }

    private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.Scanner;


public class Main {
    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();
        }
        int min;
        int count = 0;
        int c = 0;
        while (count != n) {
            min = 1000;
            for (int i = 0; i < n; i++) {
                if (a[i] < min) {
                    min = a[i];
                }
            }
            for (int i = 0; i < n; i++) {
                if (a[i] != 1000 && a[i] % min == 0) {
                    count++;
                    a[i] = 1000;
                }
            }
            c++;
        }
        System.out.println(c);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
//package cf584d12;
import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class A {
	public static void main(String[] args) {
		MyScanner sc = new MyScanner();
		int n = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i = 0; i < n; i++)
			a[i] = sc.nextInt();
		Arrays.sort(a);
		boolean[] b = new boolean[n];
		int ans = 0;
		for(int i = 0; i < n; i++)
			if(!b[i]) {
				ans++;
				for(int j = i + 1; j < n; j++)
					if(a[j] % a[i] == 0)
						b[j] = true;
			}
		out.println(ans);
		out.close();
	}
	public static PrintWriter out  = new PrintWriter(new BufferedOutputStream(System.out));
	public static class MyScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		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.Arrays;
import java.util.Scanner;


public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int []a = new int [n];
		boolean []used = new boolean[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
		}
		Arrays.sort(a);
		int ans = 0;
		for (int i = 0; i < used.length; i++) {
			if (!used[i]){
				ans++;
			  for (int j = i; j < used.length; j++) {
				if (a[j]%a[i] == 0){
					used[j] = true;
				}
			  }
			}
		}
		System.out.print(ans);
	}

}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
public class algo_2701
{
    public static void main(String args[])
    {
        Scanner ex=new Scanner(System.in);
        int n=ex.nextInt();
        int arr[]=new int[n];
        for(int i=0;i<n;i++)
        arr[i]=ex.nextInt();
        Arrays.sort(arr);
        int ans=0;
        int check[]=new int[n];
        for(int i=0;i<n;i++)
        {
            if(check[i]==0)
            {
                ans++;
                for(int j=i;j<n;j++)
                {
                    if(arr[j]%arr[i]==0)
                    check[j]=1;
                }
            }
        }
        System.out.println(ans);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] colors = new int[n];
        for (int i = 0; i < n; i++) {
            colors[i] = scanner.nextInt();
        }
        Arrays.sort(colors);
        int amountOfColors = 0;
        for (int i = 0; i < n; i++) {
            if (colors[i] != 0){
                amountOfColors++;
                int color = colors[i];
                for (int j = i; j < n; j++) {
                    if (colors[j] % color == 0){
                        colors[j] = 0;
                    }
                }
            }
        }
        System.out.println(amountOfColors);
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;


public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = sc.nextInt();
        Integer[] a = new Integer[n];
        for (int i = 0; i < n; i++)
            a[i] = sc.nextInt();
        int ans = 0;
        boolean[] taken = new boolean[n];
        Arrays.sort(a);
        for (int i = 0; i < n; i++) {
            if (taken[i]) continue;
            ans++;
            for (int j = i; j < n; j++)
                if (a[j] % a[i] == 0) taken[j] = true;
        }
        out.println(ans);
        out.flush();
        out.close();
    }


    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {
            br = new BufferedReader(new InputStreamReader(system));
        }

        public Scanner(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
import java.util.*;

public class ques1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int b = sc.nextInt();
        ArrayList<Integer> ar=new ArrayList<>();

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

        Collections.sort(ar);
        int count=0;
        int i=0;
        while(ar.size()!=0)
        {
            int tmep=ar.get(i);
            int v=ar.remove(i);
            count++;
            int j=0;
            while(j<ar.size()){
                if(ar.get(j)%tmep==0){
                    int a=ar.remove(j);

                }
                else
                    j++;
            }

        }
        System.out.println(count);



    }
}
// 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 IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        
        int n = Integer.parseInt(br.readLine());
        StringTokenizer tokenizer = new StringTokenizer(br.readLine());
        boolean[] arr = new boolean[101];
        int[] nums = new int[n+1];
        int colors = 0;
        for(int i = 1; i <= n; i++) {
            nums[i] = Integer.parseInt(tokenizer.nextToken());
            arr[nums[i]] = true;
        }
        Arrays.parallelSort(nums);
        for(int i = 1; i <= n; i++) {
            boolean newColor = false;
            if(!arr[nums[i]]) {
                continue;
            }
            for(int j = nums[i]; j <= 100; j += nums[i]) {
                if(arr[j]) {
                    arr[j] = false;
                    newColor = true;
                }
            }
            if(newColor) {
                colors++;
            }
        }
        
        bw.write(String.valueOf(colors));
        br.close();
        bw.close();
    }
}
// Problem: 1209_A. Paint the Numbers
// Time complexity: quadratic
import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import java.lang.Math.*;

public class A {

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

	public void run() throws Exception {
		FastIO file = new FastIO();
		int n = file.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) a[i] = file.nextInt();
		Arrays.sort(a);
		boolean[] used = new boolean[n];
		int count = 0;
		for (int i = 0; i < n; i++) {
			if (!used[i]) {
				count++;
				for (int j = i; j < n; j++) {
					if (a[j] % a[i] == 0) {
						used[j] = true;
					}
				}
			}
		}
		System.out.println(count);
	}

	public static class FastIO {
		BufferedReader br;
		StringTokenizer st;

		public FastIO() {
			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;
		}
	}

	public static long pow(long n, long p, long mod) {
		if (p == 0)
			return 1;
		if (p == 1)
			return n % mod;
		if (p % 2 == 0) {
			long temp = pow(n, p / 2, mod);
			return (temp * temp) % mod;
		} else {
			long temp = pow(n, (p - 1) / 2, mod);
			temp = (temp * temp) % mod;
			return (temp * n) % mod;

		}
	}

	public static long pow(long n, long p) {
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		if (p % 2 == 0) {
			long temp = pow(n, p / 2);
			return (temp * temp);
		} else {
			long temp = pow(n, (p - 1) / 2);
			temp = (temp * temp);
			return (temp * n);

		}
	}

	public static long gcd(long x, long y) {
		if (x == 0)
			return y;
		else
			return gcd(y % x, x);
	}

	public static boolean isPrime(int n) {
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;

		if (n % 2 == 0 || n % 3 == 0)
			return false;

		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}
}