Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- //#define cin in
- //#define cout out
- using namespace std;
- ifstream in("mangsis.txt");
- ofstream out("mangval.txt");
- int main()
- {
- //long long n; cin >> n;
- for(int n=0; n<100; n++){
- long long a=1, b=pow(10, 10), c;
- while (b > a) {
- c = (b + a) / 2;
- if (c * (c + 1) / 2 < n) {
- a = c + 1;
- }
- else {
- b = c;
- }
- }
- if(c%3==0){
- cout << "ryytlid";
- }
- else if(c%3==1){
- cout <<"maagid";
- }
- else{
- cout<<"vibulaskjad";
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement