9 条题解
-
1
#include <math.h> #include <stack> #include <stdio.h> #include <iostream> #include <vector> #include <iomanip> #include <string.h> #include <algorithm> using namespace std; #define LL long long const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int main() { int n , sum = 0 ,k = 0; cin >> n; sum = n; while(n >= 3) { sum +=n/3; n = n/3 +n%3; } cout<<sum<<endl; }
- 1
信息
- ID
- 914
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 789
- 已通过
- 303
- 上传者