I can only say how I would do that in c# I would make it Like that.
Int wins = Convert.ToInt32(Console.ReadLine());
Int draws = Convert.ToInt32(Console.ReadLine()
Points = wins*3+draws;
//Sample Input: 18, 7
That would be the simples
If you want a Code where you can Just calculate the Matches of after looking it. I would do it Like that:
string match = Console.WriteLine();
foreach(char play in string)
if(play == 'w') Points += 3;
else if (play == 'd') Points += 1;
else Points += 0;
//Sample Input: wdlwdlww
I make that Like that because it's easy to Always Just write down while you watch the Game.