摘要:
"扫雷问题" cpp include include include using namespace std; int direct[8][2]={ {1,0}, {1,1}, {1, 1}, {0,1}, {0, 1}, { 1,0}, { 1,1}, { 1, 1} }; int main(){ 阅读全文
摘要:
"3n+1问题" cpp include include include using namespace std; map visited; int getlen(int n){ if(visited[n]==0) visited[n]=(n%2==0?1+getlen(n/2):1+getlen( 阅读全文
摘要:
"10进制转16进制" cpp include include using namespace std; int main(){ long long int n; cin n; cout 阅读全文
摘要:
"16进制转10进制" cpp include using namespace std; int main(){ long long int n; cin hex n; cout 阅读全文
摘要:
"16进制转为8进制" cpp include include using namespace std; int main(){ int n; cin n; for(int j=0; j s; for(int i=0; i 阅读全文
摘要:
"数列排序" cpp include include include using namespace std; int main(){ int n; cin n; vector vi(n, 0); for(int i=0; i vi[i]; sort(vi.begin(), vi.end()); f 阅读全文
摘要:
"特殊回文数" cpp include include using namespace std; int main(){ int n; cin n; if(n=0){ int t=a 10000+b 1000+c 100+b 10+a; cout 阅读全文
摘要:
"A+B问题" cpp include using namespace std; int main(){ int a, b; cin a b; cout 阅读全文
摘要:
"Fibonacci数列" cpp include using namespace std; int main(){ int a=1, b=1, n; cin n; if(n 阅读全文
摘要:
"圆的面积" cpp include include using namespace std; double pi=3.14159265358979323; //注意精度 int main(){ int r; cin r; cout 阅读全文
摘要:
"序列求和" cpp include using namespace std; int main(){ long long int n; cin n; cout 阅读全文
摘要:
``` include include using namespace std; int main() { // int 转 string int number = 12; string str; stringstream ss; ss str; cout num; cout 阅读全文