le français
Time limit1sMemory limit512 MB
Count the alphabetic letters in a French sentence, then print the multiple of seven closest to that count, spelled out in French words with lowercase letters and spaces.
- Level
Easy3 of 10
- Topics
- String, Implementation, Math, Brute force
- Solved
- No attempts yet
Problem
kipa has been learning French for about a year. He is sad that nobody around him will ever learn it. So he decided to pose a question about French in French. French has many characteristics compared to Korean or even English.
French pronunciation is very regular, it is just very complicated. Let me present the rules a little. c is always pronounced /s/ before e, i, or y, and /k/ otherwise. Now, long ago c was pronounced /s/ even when it was not before e, i, or y. The French, unable to endure this "rule breaker", made another letter "ç" which is always pronounced /s/. The French really love their language!
The other incredible thing the language has is the negative word. Someone learning French at an elementary level would have learned that "ne ... pas" is used to negate the whole sentence. By using two words, you mark exactly the words you wanted to negate. The sentence "ce n'est pas absolument vrai." implies that it could be true in general, but "ce n'est absolument pas vrai." means it is just false.
"ne" is used a lot, and because it changes the nuance from positive to negative, you can even guess how the French think. For example, "ne ... que" usually means "only", but they seem to imply no negative meaning at all! In fact, you negate all the others by saying "ne ... que". One more, "ne ... plus" too. "plus" generally means that something becomes much more than before. By adding "ne", this phrase suddenly comes to imply that something stops becoming much. It was incredible to kipa that one can think like this.
Numbers are very complicated. For example, 21 is called "vingt et un" which is 20 and 1, but 23 is called "vingt-trois" even though they are 20 and 3! Also, 70, 80, and 90 are "soixante-dix", "quatre-vingts", and "quatre-vingt-dix" respectively, so 97 is "quatre-vingt-dix-sept" which means 4 × 20 + 10 + 7! Non-French Francophone countries simplified these long words into "septante", "huitante", and "nonante". Now here is your homework: you are given French sentences. Count the number of alphabetic letters only in this text. kipa came to think that he appreciates the French's work to preserve their culture.
As you might already know, French has agreement in gender and number. This means that every word has its gender (masculine or feminine) and its number (singular or plural), and you must put the words according to the other words in the sentence. When using "être" in the present indicative form, it could be less complicated because the verbs do not distinguish gender. The situation gets worse if you use verbs in the past participle form, which distinguish both gender and number. In fact, this text has many occurrences of agreement. You must get used to it to speak naturally!
I would like to explain probably the most difficult thing in French: the expression of the past. French had "le passé simple" long ago. Fortunately, it is barely used nowadays. The two are used to communicate that something happened in the past: "le passé composé" and "l'imparfait". The passé composé is like "have + p.p." in English but it is more difficult than "have + p.p."; instead of "avoir" ("have") you can also use "être" and only one of them is right and the other is wrong. "l'imparfait" is the unique way to express what happened in the past, compared to English.
The passé composé states only the thing that happened. You use "être" when the verb is one of the sixteen (the entire list can be found below). You also use "être" if you conjugate the verbs in pronominal form. All the other verbs go with "avoir". So you will see sentences with "avoir" much more than with "être". If you have read this far, find the multiple of seven closest to the answer explained above.
l'imparfait states that it was in the process of happening; this means that something was prolonged for a long time. You must memorize all the imparfait forms of the verbs. Also, French applies this exactly, and every time they mean it, they use this form of expression. For example, "j'étais étudiant", not "j'ai été étudiant". You cannot be a student just once, for an instant in the past. "quand j'ai ouvert la porte, ils fêtaient dans la chambre petite." Opening the door is an instant so we put the passé composé, and celebrating in the room is not an instant and we do not state a past declaration, so we put the imparfait.
In addition to this, if one knows the French word, it will help one's study of English. For example, the "chapeau" on a letter means that there was an s after the letter long ago, but there is no longer. So, "hôpital" in French is "hospital" in English, and "arrêter" in French is "arrest" in English. Also, a word like "avion" is one of the very elementary words, but "aviation" is never the elementary word and looks complicated and formal!
If you have read all the text here, congratulations! You already know a lot about French! Now, do you feel like really learning French?
Input
The first line has the sentence in French. The length of the given sentence does not exceed 1,000 letters.
Output
Print the answer according to the text explained above. Answer in French of France using only lowercase and spaces. (That is, use a space instead of a hyphen.)
Hint
The sixteen verbs are aller, apparaître, arriver, descendre, devenir, entrer, montrer, mourir, naître, partir, passer, rester, retourner, sortir, tomber, and venir.