AtCoder Beginner Contest 380 解題紀錄 (A - F)
Problem solving record for AtCoder Beginner Contest 380. Rank 525.
AtCoder Beginner Contest 378 解題紀錄 (A - F)
Problem solving record for AtCoder Beginner Contest 378. Rank 455.
AtCoder Beginner Contest 356 解題紀錄 (A - F)
Problem solving record for AtCoder Beginner Contest 356.
AtCoder Beginner Contest 331 解題紀錄 (A - E)
AtCoder Beginner Contest 331 題解 (A - E)
只寫出了4題,感覺 pD 就差臨門一腳了,繼續努力吧 ~
All problems solved by python
A - Tomorrow (abc331 A)
題意
給你一年的月份MMM和每月的天數DDD,給定一個日期 yyy年mmm月ddd日,輸出明天的日期。
思路:簡單模擬
將日期+1後計算有沒有溢位即可。
1234567891011M, D = map(int, input().split())y, m, d = map(int, input().split())d += 1 if d > D: d = 1 m += 1if m > M: m = 1 y += 1print(y, m, d)
B - Buy One Carton of Milk (abc331 B)
題意
給定需要購買的雞蛋數NNN,以及購買666個、888個、121212個雞蛋的價格SSS、MMM、LLL,求購買 至少 NNN 個雞蛋的最小花費。
思路:DP
令dp[i]dp[i]d ...
AtCoder Beginner Contest 317 題解 (A - E)
我好菜啊我好菜啊我好菜啊
AtCoder Beginner Contest 315 題解 (A - F)
為第一次打AtCoder做準備 ~