8 条题解
-
1一名蒟蒻 (陈儒乐) LV 9 @ 2022-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;
}
-
12022-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-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; ``` } ``` 我就看谁傻傻地直接超题解 ``` ``` ```
-
02022-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; }
-
02022-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; }
-
02022-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; }
-
-12023-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; }
-
-12022-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
- 标签
- 递交数
- 697
- 已通过
- 258
- 上传者