harumakigohan686

2023年1月4日

CP1042 阶乘的尾数

摘要: 本想做个小题,没想到牵扯出了大数阶乘(悲 本质上还是极限 俺的做法: #include <stdio.h> int change(int m); int main() { int a[20001]; int m,u; int temp,digit,n,i,j=0; int sum=0; scanf( 阅读全文

posted @ 2023-01-04 14:38 harumakigohan 阅读(28) 评论(0) 推荐(0)
#ACM2021_25. 有关2022

摘要: 今天整了个小题,但可惜超时了(悲 我之前的做法(暴力枚举,但超时) #include <stdio.h> #include <string.h> int main(int argc, const char *argv[]) { int a,b,c,d,e,sum,k; int count=0; sc 阅读全文

posted @ 2023-01-04 12:20 harumakigohan 阅读(35) 评论(0) 推荐(0)
CP1250 猜数魔术 CP1239 字符串反向

摘要: 我的做法: #include <stdio.h> int Magic(int m); int main() { int m, ret; printf("Input a sum:"); scanf("%d", &m); ret = Magic(m); if (ret != 1) { printf("T 阅读全文

posted @ 2023-01-04 01:36 harumakigohan 阅读(32) 评论(0) 推荐(0)

2023年1月3日

今日破防

摘要: P100 输出倒三角形图案 #include <stdio.h> #define MAX_LEN 10 #define N 150 #include<string.h> #include<stdlib.h> #include <stdio.h> int main() { int n, i, j; s 阅读全文

posted @ 2023-01-03 22:41 harumakigohan 阅读(27) 评论(0) 推荐(0)

2023年1月2日

平方加1的最大素因子

摘要: 我的做法: #include <stdio.h> #define MAX_LEN 10 #define N 150 #include<string.h> #include<stdlib.h> int main() { int n,m,j=0,l=0; int a[100]; int b[100]; 阅读全文

posted @ 2023-01-02 13:22 harumakigohan 阅读(40) 评论(0) 推荐(0)
一到n的素数和

摘要: 循环嵌套法: #include <stdio.h>#define MAX_LEN 10#define N 150#include<string.h>#include<stdlib.h>int judge(int i);int main(){ int n,i,k; int sum=0; scanf(" 阅读全文

posted @ 2023-01-02 00:35 harumakigohan 阅读(35) 评论(0) 推荐(0)

2022年12月31日

n和最近素数之间的距离

摘要: #include <stdio.h>#define MAX_LEN 10#define N 150#include<string.h>#include<stdlib.h>int main(){ int n; scanf("%d",&n); int k=0; for(int i=2;i<n-1;i++ 阅读全文

posted @ 2022-12-31 12:14 harumakigohan 阅读(46) 评论(0) 推荐(0)
求相邻数的最大最小差

摘要: #include <stdio.h>#define MAX_LEN 10#define N 150#include<string.h>#include<stdlib.h>int main(){ int a[100]; int b,j=0; while(b!=-1) { scanf("%d",&b); 阅读全文

posted @ 2022-12-31 00:00 harumakigohan 阅读(54) 评论(0) 推荐(0)