2 solutions

  • 1
    @ 2025-7-13 17:03:03

    #include <bits/stdc++.h> using namespace std; int x, t[45], s =0; int main() {

    for (int i = 1; i <= 10; i++) {
    	cin >> x;
    	t[x % 42]++;
    }
    for (int j = 0; j <= 41; j++) {
    	if (t[j]) {
    		s++;
    	}
    }
    cout << s;
    return 0;
    

    }

    • 0
      @ 2025-7-13 17:05:52

      #include <bits/stdc++.h> using namespace std; int x, t[45], s = 0; int main() {

      for (int i = 1; i <= 10; i++) {
      	cin >> x;
      	t[x % 42]++;
      
      }
      for (int j = 0; j <= 41; j++) {
      	if (t[j] > 0) {
      
      		s++;
      
      	}
      }
      cout << s ;
      return 0;
      

      }

      • 1

      Information

      ID
      392
      Time
      1000ms
      Memory
      64MiB
      Difficulty
      5
      Tags
      # Submissions
      31
      Accepted
      13
      Uploaded By