Cod sursa(job #1338723)
| Utilizator | Data | 10 februarie 2015 12:18:56 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#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;
cout << db << endl;;
cout << ossz;
return 0;
}
