第六周第一天

100

#include<bits/stdc++.h> //0,4,6,8,9

using namespace std;

int getDigitNum(int num){

if(num==0){

return 1;

}

int cnt=0;

while(num){

num/=10;

cnt++;

}

return cnt;

}

bool isNotSuShu(int num){

if(num==0){

return true;

}

for(int i=2;i*i<=num;i++){

if(num%i==0){

return true;

}

}

return false;

}

int main(){

int arr1[5]={0,4,6,8,9};

int arr2[5]={1,2,3,5,7};

int arr[100];

int num = 100;

int i=0;

while(i<100){

int temp=num;

int len = getDigitNum(temp);

while(len!=1&&isNotSuShu(temp)){

int power =1;

for(int j = 1;j<len;j++){

power*=10;

}

temp=temp%power;

len=getDigitNum(temp);

}

if(len==1&&isNotSuShu(temp)){

arr[i]=num;

i++;

}

num++;

}

int intput;

while(scanf("%d",&intput)!=EOF){

printf("%d\n",arr[intput-1]);

}

}

101

#include<bits/stdc++.h>

using namespace std;

bool isSuShu(int num){

if(num==0){

return false;

}

for(int i=2;i*i<=num;i++){

if(num%i==0){

return false;

}

}

return true;

}

int main(){

char arr[24];

while(gets(arr)){

int maxSuShu=0;

int len=strlen(arr);

for(int i=0;i<len;i++){

int temp=arr[i]-'0';

if(isSuShu(temp)){

maxSuShu=max(maxSuShu,temp);

}

}

for(int i=1;i<len;i++){

int temp1=arr[i-1]-'0';

int temp2=arr[i]-'0';

if(isSuShu(temp1*10+temp2)){

maxSuShu=max(maxSuShu,temp1*10+temp2);

}

}

for(int i=2;i<len;i++){

int temp1=arr[i-2]-'0';

int temp2=arr[i-1]-'0';

int temp3=arr[i]-'0';

if(isSuShu(temp1*100+temp2*10+temp3)){

maxSuShu=max(maxSuShu,temp1*100+temp2*10+temp3);

}

}

for(int i=3;i<len;i++){

int temp1=arr[i-3]-'0';

int temp2=arr[i-2]-'0';

int temp3=arr[i-1]-'0';

int temp4=arr[i]-'0';

if(isSuShu(temp1*1000+temp2*100+temp3*10+temp4)){

maxSuShu=max(maxSuShu,temp1*1000+temp2*100+temp3*10+temp4);

}

}

printf("%d\n",maxSuShu);

}

}

102

#include<bits/stdc++.h>

using namespace std;

int main(){

char arr[20];

while(gets(arr)){

int count=0;

int len=strlen(arr);

int i=0;

while(i<len){

if(arr[i]<'0'||arr[i]>'9'){

if(count==3){

printf(" ");

count=0;

}

printf("%c",arr[i]);

count++;

i++;

}else {

int temp=arr[i]-'0';

for(int j=0;j<=temp;j++){

if(count==3){

printf(" ");

count=0;

}

printf("%c",arr[i+1]);

count++;

}

i+=2;

}

}

printf("\n");

}

return 0;

}

人机界面为人们使用计算机提供了手段。人机界面的一个例子是键盘,它允许人类在计算机中输入命令,并在特定应用程序中输入文本。人机界面研究的多样性对应于计算机用户和应用程序的多样性。然而,一个统一的主题是开发更好的界面并对其有效性进行实验评估。示例包括改善残疾人的计算机访问,简化程序使用,开发用于虚拟现实的三维输入和输出设备,改进手写和语音识别,以及开发飞机仪表的平视显示器,其中速度、高度和航向等关键信息显示在飞行员窗户前的屏幕上。一个称为可视化的研究领域涉及以图形方式呈现大量数据,以便人们能够理解其关键属性。

理论计算机科学从数学和逻辑中汲取了许多方法。数值计算研究与数值分析中的数学研究重叠。计算机架构师与设计计算机电路的电气工程师密切合作。

除了这些历史联系之外,人工智能研究与心理学、神经生理学和语言学之间还有着密切的联系。人机界面研究也与心理学有关。机器人学家与机械工程师和生理学家合作设计新的机器人。

相关推荐
故事和你914 小时前
sdut-程序设计基础Ⅰ-实验五一维数组(8-13)
开发语言·数据结构·c++·算法·蓝桥杯·图论·类和对象
像污秽一样5 小时前
算法与设计与分析-习题4.2
算法·排序算法·深度优先·dfs·bfs
Storynone5 小时前
【Day20】LeetCode:39. 组合总和,40. 组合总和II,131. 分割回文串
python·算法·leetcode
明明如月学长6 小时前
AI 更新太快学不过来?我用OpenClaw打造专属AI学习工作流
算法
黎阳之光6 小时前
【黎阳之光:以无线专网与视频孪生,赋能智慧广电与数字中国】
算法·安全·智慧城市·数字孪生
刀法如飞7 小时前
Agentic AI时代,程序员必备的算法思想指南
人工智能·算法·agent
刀法如飞7 小时前
Agentic AI时代程序员必备算法思想详解(附实战案例)
算法·ai编程·编程开发·agentic
飞Link8 小时前
告别盲目找Bug:深度解析 TSTD 异常检测中的预测模型(Python 实战版)
开发语言·python·算法·bug
记忆多8 小时前
c++名字空间 函数模版 左右值
开发语言·c++·算法
三伏5229 小时前
控制理论前置知识——相平面数学基础2(示例部分)
算法·平面·控制