题解列表
1954-话费计算,简单易懂(C++)
摘要:解题思路:列出关于通话分钟和话费的函数,进行求解注意事项:基础知识的应用参考代码:#include<stdio.h>int main(){ int x; float y; scanf("%d",&x)……
二级C语言-求偶数和 与运算求奇偶
摘要:解题思路: 奇数 & 1 = 1 偶数 & 1 = 0 因为偶数的二进制第一位一定是0,所以可以运用按位与运算(&),判断完直接丢弃,进行黑盒操作参考代码:#include<bits/……
C++ STL Vector + 二分查找
摘要:解题思路: lower_bound:查找第一个大于或等于某个元素的位置。 upper_bound:查找第一个大于某个元素的位置。代码:#include<bits/stdc++.h>
us……
自定义函数处理最大公约数与最小公倍数
摘要:解题思路:注意事项:参考代码: def yue(a,b): min =(a<b and a or b) i=min while i>0: if a%i==0 and……
适合新手理解的c++
摘要:#include<iostream>using namespace std;int main(){ int i,j; int n; cin>>n; for(i=2;i<=n;i++)//先列出所有数,……
随便写的方法,只关注结果了
摘要:解题思路:注意事项:参考代码:#include <iostream>#include <algorithm>#include <string>#include <sstream>using name……
2222 666cyuyan C语言可以的
摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main (){ char ch=getchar(); ch+=32; putchar(ch); return 0; }……