- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 含k个3的数
#include<bits/stdc++.h>using namespace std;int main(){ int n,k,s=0; cin>>n>>k; if(n%19!=0){ cout<<"NO"; return 0; } while(n!=0){ if(n%10==3){...
2020-09-13 08:09:34 603
原创 输出矩形
#include<bits/stdc++.h>using namespace std;int main(){ int height,width,flag; char c; cin>>height>>width>>c>>flag; if(flag==0){ for(int i=1;i<=width;i++){ cout<<c; } ...
2020-09-13 08:09:02 302
原创 骑车与走路
#include<bits/stdc++.h>using namespace std;int main() { int s; cin>>s; float wt = s/1.2; float bt = 50+s/3.0; if (wt<bt) { cout << "Walk"; } else if (bt<wt) { cout << "Bike"; } e...
2020-09-13 08:06:35 178
原创 能被3,5,7整除
#include<bits/stdc++.h>using namespace std;int main() { int n; cin>>n; if (n%3==0) { cout << "3" << " "; } if (n%5==0) { cout << "5" << " "; } if (n%7==0) { cout &...
2020-09-13 08:03:01 445
原创 保留12位小数输出
#include<bits/stdc++.h>using namespace std;int main() { double d; cin>>d; cout<<setiosflags(ios::fixed) << setprecision(12); cout << d << endl; return 0;}
2020-09-13 07:58:46 224
原创 打印字符
#include<iostream>using namespace std;int main() { int n; cin>>n; cout << (char) n << endl; return 0;}
2020-09-13 07:56:28 96
原创 反向输出一个三位数
#include<iostream>using namespace std;int main() { int n; cin>>n; int a,b,c; a = n%10; b = n/10%10; c = n/100; cout << a << b << c << endl; return 0;}
2020-09-13 07:53:21 186
原创 八皇后
#include<bits/stdc++.h>using namespace std;bool d[10010]={0},b[10010]={0},c[10010]={0};int n=8,nn,N,sum=0,a[10010],x=0;void print(){ x++; if(x==nn) { int i; for(i=1;i<=n;i++) cout<<a[i]; cout<<endl; }}void dfs(i.
2020-09-12 20:40:32 54
原创 拯救行动
#include <iostream>#include <queue>#include <string.h>using namespace std;int N,K;const int maxn=210;int visited[maxn][maxn];char G[maxn][maxn];struct Point{ int r,c;//行列 int depth; int kill; Point(int rr=0,int .
2020-09-12 20:39:10 147
原创 电池的寿命
#include<bits/stdc++.h>using namespace std;int main() { int n,a[1005]; int r[100]; cout<<setiosflags(ios::fixed)<<setprecision(1); memset(r, -1, sizeof(r)); int count = 0; while(scanf("%d",&n)!=EOF) { int max=-1,sum=0; f.
2020-09-12 20:38:33 846
原创 求排列的逆序数
#include<bits/stdc++.h>using namespace std;#define N 100005long long n;long long a[N];long long b[N];long long ans = 0;void merge(long long L, long long R) { long long mid = (L + R) / 2; long long l = L; long long r = mid+1; long long co.
2020-09-12 20:37:49 148
eclipse10个骨灰级快捷键
2014-12-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人