Pagini recente » Cod sursa (job #2579053) | Cod sursa (job #1879404) | Cod sursa (job #188707) | Lot 2017 Baraj 1 Clasament | Cod sursa (job #1338727)
#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
using namespace std;
int main(){
ifstream in("text.in");
ofstream out("text.out");
string when;
int db = 1;
int ossz = 0;
getline(in,when);
for(int i = 0;i<when.length();i++){
if(when[i] == '-' or when[i] == ' '){
db++;
}
if(when[i] == '!'){
ossz--;
}
}
ossz += when.length()-db;
out << ossz/db;
return 0;
}