update
This commit is contained in:
parent
b4037033dd
commit
6bc2d99e25
BIN
20240823/十四届蓝桥比赛/14届省赛真题C++.pdf
Normal file
BIN
20240823/十四届蓝桥比赛/14届省赛真题C++.pdf
Normal file
Binary file not shown.
10
20240823/十四届蓝桥比赛/主要成分.cpp
Normal file
10
20240823/十四届蓝桥比赛/主要成分.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include<bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
int n;
|
||||
|
||||
int main(){
|
||||
ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
|
||||
|
||||
|
||||
}
|
38
20240823/十四届蓝桥比赛/八进制回文平方数.cpp
Normal file
38
20240823/十四届蓝桥比赛/八进制回文平方数.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
#include<bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
bool is_pf(int n){
|
||||
int a = sqrt(n);
|
||||
if(a*a==n){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_huiwen(int n){
|
||||
stringstream ss;
|
||||
ss<<std::oct<<n;
|
||||
string bjz(ss.str());
|
||||
int j=bjz.size()-1;
|
||||
for(int i=0;i<bjz.size();++i,--j){
|
||||
if(bjz[i]!=bjz[j]){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(){
|
||||
ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
|
||||
|
||||
int n;
|
||||
cin>>n;
|
||||
|
||||
for(int i=1;i<=n;i++){
|
||||
if(is_pf(i)&&is_huiwen(i)){
|
||||
cout<<i<<" ";
|
||||
}
|
||||
}
|
||||
cout<<endl;
|
||||
}
|
5
20240823/十四届蓝桥比赛/选择题.txt
Normal file
5
20240823/十四届蓝桥比赛/选择题.txt
Normal file
@ -0,0 +1,5 @@
|
||||
1. A
|
||||
2. D
|
||||
3. C
|
||||
4. A
|
||||
5. C
|
11
xmake.lua
11
xmake.lua
@ -1,4 +1,15 @@
|
||||
add_rules("mode.debug","mode.release")
|
||||
if is_mode("debug") then
|
||||
add_cxxflags("-O2")
|
||||
end
|
||||
set_languages("c++17")
|
||||
|
||||
target("P1158")
|
||||
set_rundir("20240821/P1158")
|
||||
add_files("20240821/P1158/P1158.cpp")
|
||||
|
||||
target("lq148jz")
|
||||
add_files("20240823/十四届蓝桥比赛/八进制回文平方数.cpp")
|
||||
|
||||
target("lq14zy")
|
||||
add_files("20240823/十四届蓝桥比赛/主要成分.cpp")
|
Loading…
Reference in New Issue
Block a user