All submissions for this problem are available.
Anil is a final year university student. He saw a beautiful girl Anarkali when he was walking to university
Now he needs to find out whether she has a lover or not. He hacked into the mobile network and got access to her SMS history.
She may has boyfriend if message contain words(flagged_words).
You need to print Probability of she is having a lover P(A) in simplified fraction.
P(A) = flagged_words / total_words_in_a_sms
Message from Anarkali's SMS history M
Probability of she is having a lover P(A) in simplified fraction
Input: babe you're my life Output: 1/2
There are 4 words and 2 words are flagged. Then P(A) is 2/4. Simplified fraction is 1/2. Therefore we print 1/2 as the answer.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions