int CountBlow(string ans, string input) { int count = 0; //チェック通ってるんで、ansとinputの長さは同じ前提 //for (int i = 0; i < 4; i++) C言語の時 for (int i = 0; i < ans.length(); i++) { //for(int j = 0; j < 4; j++) { C言語の時 for(int j = 0; j < input.length(); j++) { if (BLOWかどうか) { if(HITの時は除いてカウントする) count++; } } } return(count); }