Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- int s,x=-1;
- cin>>s;
- while(s>0)
- {
- s=s-3;
- x++;
- }
- ofstream fout("rez.dat");
- fout<<x<<" ";
- if(s+3==1)
- fout<<x<<" "<<x+1;
- else
- fout<<x+1<<" "<<x+1;
- fout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement