|
#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
|
|
不嘻嘻
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
12345678900987654321234
题目 623 [NOIP 2011]数字反转
2024-07-20 08:44:13
|
|
#include<bits/stdc++.h>
using namespace std; int main() {freopen("twoj.in","r",stdin ); freopen("twoj.out","w",stdout ); int l,r,j,x=0,k=0; cin>>l>>r; for(int i=l;i<=r;++i) {j=i;while(j) { k=j%10; if(k==2) x++; j=j/10 ;}} cout<<x; return 0; fclose(stdin);fclose(stdout);} |
|
多谢前辈
题目 2020 [NOI 2015]寿司晚宴
2024-07-19 15:49:28
|
|
#include<bits/stdc++.h>
using namespace std; int main() {freopen("count2013.in","r",stdin ); freopen("count2013.out","w",stdout ); int n,z,j,x=0,k=0; cin>>n>>z; for(int i=1;i<=n;++i) {j=i;while(j) { k=j%10; if(k==z) x++; j=j/10 ;}} cout<<x; return 0; fclose(stdin);fclose(stdout);}
题目 1423 [NOIP 2013]计数问题
2024-07-19 10:53:52
|
|
回复 @2018noip必胜! :
#include<bits/stdc++.h> using namespace std; int main(){ int a,b=0; freopen("reverse.in","r",stdin); freopen("reverse.out","w",stdout); cin>>a; while (a) {b=b*10+a%10; a/=10;} cout <<b;} 。。。。。。。。。
题目 623 [NOIP 2011]数字反转
2024-07-19 10:12:03
|
|
题目 1053 [NOIP 2009PJ]多项式输出
2024-07-18 09:00:06
|
|
so easy
题目 1053 [NOIP 2009PJ]多项式输出
2024-07-18 08:58:38
|
|
萌新表示不会
![]()
题目 122 [NOIP 2007]奖学金
2024-07-17 08:36:09
|
|
都有实力
|
|
#include<bits/stdc++.h>
using namespace std; long long b,p,k; int f(int a) { if(a==0) return 1; int t=f(a/2)%k; t=(t*t)%k; if(a%2==1) t=(t*(b%k))%k; return t; } int main() { freopen("dmod.in","r",stdin); freopen("dmod.out","w",stdout); cin>>b>>p>>k; int b1=b; b%=k; printf("%d\n",f(p)); } 我又怎么错了?!!!
题目 1130 取余运算
2024-07-16 08:29:59
|
|
terrific
|
|
回复 @ムラサメ : 大佬你人好好Q^Q
题目 463 [NOIP 2003]乒乓球
2024-07-15 11:27:26
|
|
指针数组我们开的大小为 $d_x$ 时,则该数组下标也是从 0 开始的,不能访问 $f[x,d_x]$
题目 2652 秘术「天文密葬法」
2024-07-14 15:52:37
|
|
喜报: unr d1t3 出现这个模型,被取之。回旋镖哦哦哦哦
|
|
幽默topcoder
题目 4004 喵星人集会
2024-07-12 15:47:49
|