9 条题解
-
1wangyihan LV 7 @ 2022-1-11 9:28:11
#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; }
-
02024-11-29 21:48:41@
#include <bits/stdc++.h> using namespace std; int a,k,ans; int main() { cin>>a; ans = a; k = a; while(k>=3){ ans+=k/3; k = k%3+k/3; } cout<<ans; return 0; }
-
02022-7-9 10:25:54@
/crl(陈儒乐)/
#include<bits/stdc++.h>//网上查到的万能头//
using namespace std;
int main()
{
int n; cin >> n; int ans = n; int k = n; while(k >= 3) { ans += k/3; k = k%3 + k/3; } cout << ans << endl; return 0;
}
-
-12024-3-19 16:55:56@
#include <iostraem> using namespace std; int main() { int a, z; cin>>a>>z; if (a>= 10 && z >= 20 ) ``` ``` { cout<<1; } else { cout<<0; } return 0; ``` } ``` 我就看谁傻傻地直接超题解 ``` ``` ```
-
-12022-1-11 9:29:17@
#include <iostream> #include <math.h> using namespace std; 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; }
-
-12022-1-11 9:26:24@
#include<iostream> #include<stdio.h> #include <math.h> using namespace std; 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; }
-
-12022-1-11 9:24:40@
#include <iostream> #include <math.h> using namespace std; 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; }
-
-22023-11-5 21:48:37@
#include<iostream> using namespace std; const int N=1e2+10; const int INF=0x3f3f3f3f; int a,b,n; int main(){ cin>>n; b=n; while(n>=3) { a=n/3; n=n%3+a; b+=a; } cout<<b; return 0; }
-
-22022-1-11 9:23:37@
#include <iostream> #include <math.h> using namespace std; 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
- 标签
- 递交数
- 770
- 已通过
- 293
- 上传者