+ 1

Hi can anyone help me?

Tomatoes task There are 9 total tomatoes==n 4 of them are red after 2 days==m And 2 days period ==d In every day 2 of them turns red the ones around red ones Red=r ; not red=nr; Nr,nr,nr,nr, r ,nr,nr,nr,nr How to calculate Answer is 4 I know its a terrible explanation

31st Oct 2019, 12:49 PM
Evaldas
Evaldas - avatar
8 Antworten
+ 7
Your attempt ?
31st Oct 2019, 1:01 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
31st Oct 2019, 2:08 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 4
100% acurate answer .thank you really much
31st Oct 2019, 2:23 PM
Evaldas
Evaldas - avatar
+ 3
#include <iostream> #include <fstream> Using namespace std: Int main() { Int n,m,d; Int s; Ifstream fin("pomidorai.in"); Ofstream fout("pomidorai.out"); fin >> n >> m >> d; s = 0; for(int a = m + 2; a <= n;a++) s = m + d; fout << s ; fin.close(); fout.close(); return 0; }
31st Oct 2019, 1:09 PM
Evaldas
Evaldas - avatar
+ 3
I'm sorry, but I still don't understand what you're trying to achieve, can you give better explanation to your problem ? What do you calculate ?
31st Oct 2019, 1:24 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
If anything look super stupid .i am sorry .i am a student.
31st Oct 2019, 1:10 PM
Evaldas
Evaldas - avatar
+ 1
Its hard to explain without pictures do you have a messanger or whatsapp? It would be easier to explain with pictures
31st Oct 2019, 1:27 PM
Evaldas
Evaldas - avatar
0
I did get the answer 4 but auto check doesent give me 100% but only 9% so i must add more cycles or something i cant understand
31st Oct 2019, 1:23 PM
Evaldas
Evaldas - avatar