不多说 上代码 亲测有效
#include <bits/stdc++.h>
using namespace std;
int main() {
queue<int> q;
char c;
int i;
while (cin >> c) {
if (c == 'I') {
cin >> i;
q.push(i);
} else if (c == 'O') {
if (q.empty()) {
cout << "None" << endl;
} else {
cout << q.front() << endl;
q.pop();
}
}
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int c=1,d=1,v=2;
int main(){
int q;
cin >> q;
for(int i=1; i<=q-2; i++){
v=d;
d=c+d;
c=v;
}
cout << d;
}
#include<bits/stdc++.h>
using namespace std;
int n,x=1,y;
long long sum=1;
void aa(int m){
n++;
x++;
cout << sum << endl;
sum=sum*x;
if(n<m){
aa(m);
}
}
int main(){
cin >> y;
aa(y);
}
有效的完全平方数
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
for(int i=1; i<=n; i++){
if(i*i<n){
}else{
if(i*i==n){
cout << "true";
return 0;
}else{
cout << "false";
return 0;
}
}
}
}