4 solutions

  • 1
    @ 2025-8-7 12:55:15
    using namespace std;
    int main(){
    	int n;
    	string a;
    	cin>>n;	
        cin.ignore();
    	getline(cin,a);
    	stringstream ss(a);
    	string word;
    	int h=0;
    	while(ss>>word){
    		if(word.length()>=n){
    		h++;	
    		}
    	}	
    	cout<<h<<endl;
    	return 0;
    } 
    
    
    • 1
      @ 2025-8-6 21:25:49

      #include <bits/stdc++.h> using namespace std; int n, num; string s; int main() { cin >> n; while (cin >> s) { if (s.size() >= n) { num++; } } cout << num; return 0; }

      • 0
        @ 2025-8-26 9:06:40
        
        #include<bits/stdc++.h>
        using namespace std;
        int main(){
            int n,s=0;
            string a;
            cin>>n;
            while(cin>>a){
                if(a.length()>=n)
                    s++;
            }
            cout<<s;
            return 0;
        }
        
        • 0
          @ 2025-8-7 11:55:29
          
          #include<bits/stdc++.h>
          using namespace std;
          int main(){
              int  n,cnt=0;
              cin>>n;
              string a;
              while(cin>>a){
                  if(a.length()>=n){
                   cnt++;
                  }
              }
              cout<<cnt;
              return 0;
          }
          
          • 1

          Information

          ID
          1075
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          6
          Tags
          (None)
          # Submissions
          54
          Accepted
          15
          Uploaded By