当前位置:网站首页>Xiaoqingtai officially set foot on the third day of no return
Xiaoqingtai officially set foot on the third day of no return
2020-11-08 13:52:00 【osc_3vp99iw6】
Xiaoqingtai officially set foot on the road of no return 3 God
Look at the notes before
Look at the current level
I can't help but flow down Regretful Tears
Do your homework. It's fun to do it ( Catch ) Cause ( ear ) Bo ( Scratch ) Bo ( Gill )
I'd like to have my hair pulled out
There's so much bullshit
Well, I'm going to record every simple question that I just can't do TAT
- Given two numbers , Find the greatest common divisor of these two numbers
< I hate common divisors >
#include <stdio.h>
int main()
{
int a,b,c,i;
scanf("%d%d",&a,&b);
if (a < b)
{
c = a; a = b; b = c;
}
for (i = b;i <= a; i--)
{
if (a % i == 0 && b % i == 0)
{
printf(" The greatest common divisor is :");
printf("%d\n",i);
break;
}
}
return 0;
}
- Print 1000 Year to 2000 Leap year between years
< I also hate leap year >
#include <stdio.h>
int main()
{
int i;
printf(" Interval leap years have :");
for(i=1000;i<2001;i+=4)
{
if(i%4==0)
{
printf("%d\n",i);
}
}
return 0;
}
- Calculation 1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 Value , Print out the results
< It's practical to do this problem 40min I'm stone >
Calculation 1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 Value , Print out the results
#include <stdio.h>
int main()
{
int i;
float sum=1;
printf(" The sum of the required items is :");
for(i=2;i<=100;i++)
{
if(i%2==0)
{
sum+=-1.0/i;
}
else{
sum+=1.0/i;
}
}
printf("%f\n",sum);
return 0;
}
- 1 To 100 How many numbers appear in all integers of 9
#include <stdio.h>
int main()
{
int i,j=0;
printf(" Numbers 9 The number of :");
for(i=1;i<101;i++)
{
if(i%10==9)
{
j++;
}
}
printf("%d",j);
return 0;
}
- Print 100~200 The prime between
< prime number = Abnormal number >
#include <stdio.h>
int main()
{
int i,j;
printf(" Prime numbers have intervals :");
for(i=100;i<=200;i++)
{
for(j=2;j<i;j++)
{
if(i%j==0)
{
break;
}
}
if(i==j)
{
printf("%d\n",i);
}
}
return 0;
}
- Output... On the screen 99 Multiplication table
#include<stdio.h>
int main()
{
int i=0;
for(i=1;i<=9;i++)
{
int j=0;
for(j=1;j<=i;j++)
{
printf("%d*%d=%d ",i,j,i*j);
}
printf("\n");
}
return 0;
}
- seek 10 The maximum of integers
#include <stdio.h>
int main()
{
int a[11],i;
for(i=1;i<=10;i++)
{
scanf("%d",&a[i]);
}
a[0]=a[1];
for(i=1;i<=10;i++)
{
if(a[i]>=a[0]) a[0]=a[i];
}
printf(" The maximum value is :");
printf("%d\n",a[0]);
return 0;
}
Total time 120min;
total error n Time ;
Total collapse n+1 Time ;
版权声明
本文为[osc_3vp99iw6]所创,转载请带上原文链接,感谢
边栏推荐
- wanxin finance
- Or talk No.19 | Facebook Dr. Tian Yuandong: black box optimization of hidden action set based on Monte Carlo tree search
- WLAN 直连(对等连接或 P2P)调研及iOS跨平台调研
- 用科技赋能教育创新与重构 华为将教育信息化落到实处
- Get PMP certificate at 51CTO College
- 擅长To C的腾讯,如何借腾讯云在这几个行业云市场占有率第一?
- 新型存算一体芯片诞生,利好人工智能应用~
- [Python 1-6] Python tutorial 1 -- number
- Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
- 喝汽水,1瓶汽水1元,2个空瓶可以换一瓶汽水,给20元,可以多少汽水
猜你喜欢
一文读懂机器学习“数据中毒”
Tidb performance competition 11.02-11.06
On monotonous stack
Suitable for C / C + + novice learning some projects, do not give me to miss!
Why is Schnorr Signature known as the biggest technology update after bitcoin segwit
On the software of express delivery cabinet and deposit cabinet under Windows
How to write a resume and project
原创 | 数据资产确权浅议
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
This time Kwai tiktok is faster than shaking.
随机推荐
Drink soda, a bottle of soda water 1 yuan, two empty bottles can change a bottle of soda, give 20 yuan, how much soda can you
Rust: performance test criteria Library
Major changes in Huawei's cloud: Cloud & AI rises to Huawei's fourth largest BG with full fire
阿里云视频云技术专家 LVS 演讲全文:《“云端一体”的智能媒体生产制作演进之路》
来自朋友最近阿里、腾讯、美团等P7级Python开发岗位面试题
别再在finally里面释放资源了,解锁个新姿势!
laravel8更新之维护模式改进
wanxin finance
华为云重大变革:Cloud&AI 升至华为第四大 BG ,火力全开
The progress bar written in Python is so wonderful~
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
Improvement of maintenance mode of laravel8 update
Huawei has an absolute advantage in the 5g mobile phone market, and the market share of Xiaomi is divided by the market survey organization
10个常见的软件架构模式
Shell uses. Net objects to send mail
Flink from introduction to Zhenxiang (7. Sink data output file)
When kubernetes encounters confidential computing, see how Alibaba protects the data in the container! (Internet disk link attached)
谷歌开源能翻译101种语言的AI模型,只比Facebook多一种
On monotonous stack
Interpretation of deepmind's latest paper: the causal reasoning algorithm in discrete probability tree is proposed for the first time