|
题目 3927 [CSP 2023J]小苹果
2024-07-22 10:06:08
|
|
#include<bits/stdc++.h>
using namespace std; int main() {freopen("csp2022pj_pow.in","r",stdin); freopen("csp2022pj_pow.out","w",stdout); int a,b; cin>>a>>b; if(pow(a,b)<1000000000) cout<<int(pow(a,b)); else cout<<"-1"; fclose(stdin);fclose(stdout); return 0;} |
|
666
|
|
1
题目 3375 [NOI Online 2020 1st PJ]文具订购(民间数据)
2024-07-21 11:22:12
|
|
求教程!!!
题目 3375 [NOI Online 2020 1st PJ]文具订购(民间数据)
2024-07-21 11:18:22
|
|
![]()
页面 16 [题目] 历年 NOIP/CSP 试题
2024-07-21 11:16:48
|
|
挺简单
|
|
题太水 答案供参考
#include <bits/stdc++.h> using namespace std; int main() { string s; int i,n,st,s1=0; freopen("csp2019pj_number.in","r",stdin); freopen("csp2019pj_number.out","w",stdout); getline(cin,s); st=s.length(); for(i=0;i<=st-1;i++) if(s[i]=='1') s1++; if(s1==0) cout<<'0'; else cout<<s1; fclose(stdin); fclose(stdout); }
题目 3285 [CSP 2019J]数字游戏
2024-07-21 10:40:26
|
|
#include<bits/stdc++.h>
using namespace std; int main() {freopen("title.in","r",stdin); freopen("title.out","w",stdout); char st[200];int sum; while(scanf("%s",st)==1) sum+=strlen(st); cout<<sum; }
题目 3049 [NOIP 2018PJ]标题统计
2024-07-21 10:20:47
|
|
so easy
|
|
这道题太水,别写了
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C,s=0; freopen("nscore.in","r",stdin); freopen("nscore.out","w",stdout); cin>>A>>B>>C; s=A*0.2+B*0.3+C*0.5; cout<<s; fclose(stdin); fclose(stdout); return 0; }
题目 2868 [NOIP 2017PJ]成绩
2024-07-21 09:21:08
|
|
Just so so~
|
|
题目 2562 [NOIP 2016PJ]买铅笔
2024-07-21 09:09:26
|
|
#include <bits/stdc++.h>
using namespace std; int main() { freopen("pencil.in","r",stdin); freopen("pencil.out","w",stdout); int n,num[5]={},pri[5]={},alm[5]; cin>>n; for(int i=1;i<=3;i++) {cin>>num[i]>>pri[i]; if(n%num[i]==0) alm[i]=n/num[i]*pri[i]; if(n%num[i]!=0) alm[i]=(n/num[i]+1)*pri[i];} for(int i=1;i<=2;++i) for(int j=1;j<=3-i;++j) if(alm[j]<alm[j+1]) swap(alm[j],alm[j+1]); cout<<alm[3]; }
题目 2562 [NOIP 2016PJ]买铅笔
2024-07-21 09:06:31
|
|
so easy
|
|
#include <bits/stdc++.h>
using namespace std; int main() { freopen("2015coin.in","r",stdin); freopen("2015coin.out","w",stdout); int n,jinbi=0,days=0; cin>>n; for(int i = 1;i<=n;i++) {if(days>=n) break; for(int j = 1;j<i+1;j++) {jinbi+=i; days++; if(days>n) jinbi-= i;}} cout<<jinbi;}
题目 2110 [NOIP 2015PJ]金币
2024-07-21 08:20:09
|
|
简单
|
|
#include<bits/stdc++.h>
using namespace std; int main(){ long long a,j=0; freopen("prime.in","r",stdin); freopen("prime.out","w",stdout); cin>>a; for(long long int i=2;i<sqrt(a);i++) {if(a%i==0) {cout<<a/i; break;fclose(stdin);fclose(stdout);}}return 0;}
题目 1268 [NOIP 2012PJ]质因数分解
2024-07-20 10:25:47
|
|
诶亚,这怎么回事儿啊这是
题目 623 [NOIP 2011]数字反转
2024-07-20 09:16:29
|
|
不嘻嘻
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |