Codeforces 1047A. Little C Loves 3 I Solution

Solve in C++:
  1. ///**********ALLAH IS ALMIGHTY************///
  2. ///AH Tonmoy
  3. ///Department of CSE,23rd batch
  4. ///Islamic University,Bangladesh
  5. #include<iostream>
  6. using namespace std;
  7. int main()
  8. {
  9. int n,r1,r2;
  10. cin>>n;
  11. if(n%3==0)
  12. cout<<"1 "<<"1 "<<n-2<<endl;
  13. else
  14. cout<<"1 "<<"2 "<<n-3<<endl;
  15. }

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.