洛谷 P1150 Peter的煙 題解
原題鏈接:https://www.luogu.com.cn/problem/P1150? ? ? ?
我的洛谷:https://www.luogu.com.cn/user/453321
公式大法好!
我只管寫公式,什么模擬都是垃圾
公式?a+(a-1)/(b-1)
沒錯 就這么簡單
上ac 代碼
#include <iostream>?
using namespace std;?
int main(){ ?
int a,b; ??
cin>>a>>b; ?
cout<<a+(a-1)/(b-1);?
}
101b恐怖如斯
本文章為我自己原創(chuàng)作品,可供學(xué)習(xí)使用,嚴(yán)禁抄襲,復(fù)制。抄襲必究。
標(biāo)簽: