Advertisement
coolizer

Untitled

Jan 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(void){
  4. // 自分の得意な言語で
  5. // Let's チャレンジ!!
  6.  
  7. string str, str2;
  8. getline(cin, str);
  9. getline(cin, str2);
  10.  
  11. int ans = 0;
  12. int length = str[0] - '0';
  13. int myInts[length];
  14. for (int i = 0; i < str2.length(); i++){
  15. int a = str2[i]-'0';
  16. if (a > 0 && a < 101){
  17. myInts[ans] = a;
  18. ans++;
  19. }
  20. }
  21. ans = 0;
  22. for(int i = 0; i < length; i++){
  23. if (myInts[i] > 5){
  24. ans++;
  25. }
  26. }
  27. cout << ans << endl;
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement