Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <fstream>
- #include <math.h>
- using namespace std;
- int main(){
- int a,b,c,g = 0,i=0;
- cin>>a;
- while(g ==0){
- if ((a-i*3)<0){
- cout<<0<<endl;
- cout<<0;
- return 0;
- }
- else{
- if((a-i*3) % 4 == 0 ){
- cout<<i<<endl;
- if((a-(i*3))/4 >= 0){
- cout<<(a-(i*3))/4<<endl;
- }
- else{
- cout<<0;
- }
- return 0;
- }
- }
- i+=1;
- }
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement