求助 #5#8#10 WA
查看原帖
求助 #5#8#10 WA
773388
GBWANG7786楼主2022/10/23 23:11
#include <bits/stdc++.h>
using namespace std;

unsigned long long n,opt;

int main(){
	cin >> n >> opt;
	
	for(int i = 1;i <= opt;i ++){
		n ++;
 		
		if(n % 3 == 0){
			n /= 3;
		}
		
		if(n == 1){
			
            if(opt % 2 == 0){
                cout << 2;
                return 0;
            }else{
                cout << 1;
                return 0;
            }
            
        }
	}
	
	cout << n;
	cout << endl;
}
2022/10/23 23:11
加载中...