20240426

React and TypeScript

It's said that the conbination of React and TypeScript a popular way to build large-scale application. Although I'm getting familiar with Vue.js, it might be better to start exploring the frameworks as I sense that I might be in projects using them.

266A. Stones on the Table

package main

import (
    "fmt"
)

func main() {
    var n int
    fmt.Scan(&n)

    // stones are colored with 3 colors
    // > Count the minimum number of stones to take from the table
    // > so that any two neighboring stones had different colors.
    // to make any neighboring stones have different colors,
    // consecutive stones with the same colors need to be removed.
    // <=> Count the number of stones with the same color as the next stone.
    var stones string
    fmt.Scan(&stones)

    counter := 0
    for i := 0; i < n-1; i++ {
        if stones[i] == stones[i+1] {
            counter += 1
        }
    }
    fmt.Println(counter)
}

Fried rice 350 Protein chips 150 Kombucha 200 Avocado role 300 Salmon Donburi 800 Yogurt 100

Total 1900 kcal


TODO:


index 20240425 20240427