Codeforces 379A - New Year Candles
Solution in C++:
///La ilaha illellahu muhammadur rasulullah
///******Bismillahir-Rahmanir-Rahim******///
///AH Tonmoy
///Department of CSE,23rd batch
///Islamic University,Bangladesh
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- long long int a,b,i;
- cin>>a>>b;
- for(i=1; i<=a; i++)
- {
- if(i%b==0)
- a++;
- }
- cout<<a<<endl;
- }
No comments