211, 3136: [Example 23.1] The day after tomorrow
Informatics Olympiad - Programming Enlightenment (C++ version) Online Evaluation System
212, 3137: [Example 23.2] How many days are there in this month?
Informatics Olympiad - Programming Enlightenment (C++ version) Online Evaluation System
213, 3138: [Example 23.3] Simple calculator
Informatics Olympiad - Programming Enlightenment (C++ version) Online Evaluation System
#include<iostream>
using namespace std;
int main()
{
int num1,num2;
char op;
cin>>num1>>num2>>op;
switch(op)
{
case '+': cout<<num1+num2<<endl;break;
case '-': cout<<num1-num2<<endl;break;
case '*': cout<<num1*num2<<endl;break;
case '/': if(num2!=0)
{
cout<<num1/num2<<endl;
break;
}
else
{
cout<<"Divided by zero!"<<endl;
break;
}
default: cout<<"Invalid operator!"<<endl;
}
return 0;
}
/*
NOI / 1.4编程基础之逻辑表达式与条件分支
19简单计算器 2021.11.12 AC
http://noi.openjudge.cn/ch0104/solution/31261125/
*/
#include <iostream>
using namespace std;
int main()
{
int a,b;
char c;
cin>>a>>b>>c;
switch(c)
{
case '+':cout<<a+b;break;
case '-':cout<<a-b;break;
case '*':cout<<a*b;break;
case '/':if(b!=0) cout<<a/b;
else cout<<"Divided by zero!"; break;
default:cout<<"Invalid operator!";
}
return 0;
}
214, 3139: Practice 23.1 performance level
Informatics Olympiad - Programming Enlightenment (C++ version) Online Evaluation System
#include<iostream>
using namespace std;
int main()
{
int n;
char score;
//cout<<"请输入分数:";
cin>>n;
switch(n/10) //n、10是整型,n/10也是整型
{
case 10:
case 9: score='A';break;
case 8:
case 7: score='B';break;
case 6: score='C';break;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0: score='D';break;
default: score=' ';break; //一个空格赋值给score
}
cout<<score;
return 0;
}
/*
作业:
2057:【例3.9 】星期几
http://ybt.ssoier.cn:8088/problem_show.php?pid=2057
2058:【例3.10】简单计算器
http://ybt.ssoier.cn:8088/problem_show.php?pid=2058
2059:【例3.11】买笔
http://ybt.ssoier.cn:8088/problem_show.php?pid=2059
*/
215, 3140: Practice 23.2 Wangzhai Six Flavors
Informatics Olympiad - Programming Enlightenment (C++ version) Online Evaluation System
#include<iostream>
using namespace std;
int main()
{
int n;
//cout<<"请输入编号:";
cin>>n;
switch(n)
{
case 1: cout<<"寿仙菇"<<endl;break;
case 2: cout<<"酒糟芋"<<endl;break;
case 3: cout<<"下山笋"<<endl;break;
case 4: cout<<"太师豆腐"<<endl;break;
case 5: cout<<"孝子鱼"<<endl;break;
case 6: cout<<"猪全福"<<endl;break;
default: cout<<"无此编号的菜"<<endl; break;
}
return 0;
}
216, 931. Number of triangles (Course 9)
#include<bits/stdc++.h>
using namespace std;
int abc(int a,int b,int c)
{
if( a+b>c && a+c>b && b+c>a )
{
return 1;
}
else
{
return 0;
}
}
int main()
{
int a,b,n,x,ans=0;
cin>>a>>b>>n;
int c[n];
for(int i=0;i<n;i++)
{
cin>>c[i];
}
for(int i=0;i<n;i++)
{
x=abc(a,b,c[i]);
if( x==1 )
{
ans++;
}
}
cout<<ans<<endl;
return 0;
}
217, 932. Leap years (Course 9)
218, 671. Astronomical Castle (drawing a semicircle) (Lesson 12 of the Magic Academy)
int main(){
p.up();
p.ee(50,50,1);
p.bk(25).rr(100,50,0);
return 0;
}
219, 82. Enter the number of spins (Magic Academy Lesson 13)
220, 83. Enter color (Magic Academy Lesson 13)
CSP-J2020 semi-finals problem solutions
CSP-J2020 semi-finals questions solutions_csps2020 semi-finals test questions-CSDN blog
CSP-J2021 second round problem solving analysis
CSP-J2021 Second Round Problem Solving Analysis_csp Second Round-CSDN Blog
[Solution] CSP-J2022 semi-finals question solution
[Problem Solution] CSP-J2022 Semi-final Problem Solution_2023csp-j Semi-final Answer-CSDN Blog
[Review before CSP exam] Things to note during the exam
[CSP pre-exam review] Things to note during the exam_csp java debugging-CSDN blog
How to achieve good results in the second round of the Informatics Olympiad CSP-J2 CSP-S2
Speaking of calculus, I used a computer to draw 100,000 beans
Speaking of calculus, I used a computer to draw 100,000 beans_bilibili_bilibili
Vocal, the matrix can actually store pictures in the computer?
Vocal, the matrix can actually store pictures in the computer? _bilibili_bilibili
Understand modern physics from the four basic forces|The necessary knowledge reserves to read "Oppenheimer"
Introductory Algorithm Course (8)-What is dynamic programming?
Introductory Algorithm Course (8)-What is dynamic programming? _bilibili_bilibili
Comprehensive Question List to Comprehensively Improve Luogu Algorithm Competition Abilities
Comprehensive question list to comprehensively improve Luogu algorithm competition ability - Zhihu
Informatics Olympiad Comprehensive Manual·Training Questions for Masters
Informatics Olympiad Master Training Questions and Answers Catalog
Informatics Olympiad Master Training Questions and Answers Directory-CSDN Blog
2017 Yuyao primary school group semi-finals and test data package.rar
"Advanced Guide to Algorithm Competition" Problem Solutions
Advanced Guide to Algorithm Competition
"Advanced Guide to Algorithm Competition" Problem Solutions (Updating
"Advanced Guide to Algorithm Competition" Problem Solution (Updating - CSDN Blog
Chapter 2 of the Advanced Guide to Algorithm Competition--Problem Solution
Chapter 2 of the Advanced Guide to Algorithm Competition--Problem Solution-CSDN Blog
"Advanced Guide to Algorithm Competition" Problem Solutions (Updating
"Advanced Guide to Algorithm Competition" Problem Solution (Updating - CSDN Blog
Advanced Guide to Algorithm Competition - Detailed Explanation of 3 Bit Operation Questions
Algorithm Competition Advanced Guide Search 0x22 Depth First Search
Luo Yongjun → "Algorithm Competition · Quick 300 Questions" One question per day: "Push the Box" ← Difference and prefix sum
Algorithm competition quick 300 questions
https://blog.csdn.net/weixin_43914593/category_12377073.html