#include<iostream>using namespace std;int main(){ int ts; cin>>ts; for(int i=0;i<ts-1;i++){ int n,a,b; while(cin>>n){ int sum = 0; while(n--){ int t; ...
分类:
其他好文 时间:
2016-10-22 15:11:37
阅读次数:
171
实验一:字符判断 1.实验要求:输入一个字符,判断它如果是小写字母输出其对应大写字母;如果是大写字母输出其对应小写字母;如果是数字输出数字本身;如果是空格,输出“space”;如果不是上述情况,输出“other”。 2.代码: 3.运行结果: 4.知识点总结:输入字符时用“char” 字符的计算 i ...
分类:
其他好文 时间:
2016-10-22 15:06:57
阅读次数:
192
#include<iostream>#include<cmath>using namespace std;int main(){ int n; cin>>n; if(n==1) { cout<<2<<endl; return 0; } n=n-1; int t=3; while(t<=104730) ...
分类:
其他好文 时间:
2016-10-22 15:06:55
阅读次数:
169
1. 字符判断 输入一个字符,判断它如果是小写字母输出其对应大写字母;如果是大写字母输出其对应小写字母;如果是数字输出数字本身;如果是空格,输出“space”;如果不是上述情况,输出“other”。 总结:1.理解如何大写小写字母如何转换 因为大写小写字母ASCII码值相差32 2.注意‘ ’代表的 ...
分类:
其他好文 时间:
2016-10-22 15:05:35
阅读次数:
221
方老师与素数 Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit Status 方老师最近很喜欢素数,他想玩一个游戏: 现在有两个44位的素数nn和mm,你一次可以改变nn的一位 ...
分类:
其他好文 时间:
2016-10-22 14:59:08
阅读次数:
250
#include<iostream>using namespace std;int main(){ int n; while(cin>>n&&n!=0&&n<=4){ int t; int max=0; for(int i=0;i<n;i++){ cin>>t; if(t>max) max=t; } ...
分类:
其他好文 时间:
2016-10-22 14:54:48
阅读次数:
224
Bounds是AABB包围盒的数据表示,AABB包围盒是包含对象,且边平行于坐标轴的最小六面体,如下图所示: 注意标注的Bounds的主要属性 而我们获得Bounds的主要途径有三种: Render.bounds Collider.bounds(Collider2D.bounds类似,就不赘述) M ...
分类:
其他好文 时间:
2016-10-22 14:54:23
阅读次数:
177
#include<iostream>#include<cmath>#include<cstdio> using namespace std; template <typename T, int capacity> class Array { public: Array(); ~Array(); bo ...
分类:
其他好文 时间:
2016-10-22 14:45:01
阅读次数:
172
#include<iostream>#include<sstream>#include<cstring>using namespace std;int main(){ char s[1000]; string str; int count = 0; int count1 = 0; cin.get(s ...
分类:
其他好文 时间:
2016-10-22 14:39:37
阅读次数:
184
#include<iostream>#include<iomanip>#include<set>#include<vector>#include<algorithm>using namespace std;class SetOperation { public: // Add any codes y ...
分类:
其他好文 时间:
2016-10-22 14:37:08
阅读次数:
206