Run ID:139499
提交时间:2025-12-07 11:52:56
#include<bits/stdc++.h> //#include<cmatch> using namespace std; int main() { /** int a=9; int b[100]={0,1,2};//数字容器里面装的是数字 //字符数组 容器里面装的字符 ‘’单引号 char c='1';// '0' 48 'A' 65 'a' 97 char d[长度];//容器的个数 char n; cin>>n; //n+1;n-1 if((n-1)>=32 and (n-1)<=126){ cout<<n-1; }else{ cout<<"Input Error!"; } cout<<endl; if((n+1)>=32 and (n+1)<=126){ cout<<n+1; }else{ cout<<"Input Error!"; } int n; cin>>n;//个数 for(int i = 1;i<=n;i++){ //接下来还要输入n个数 double a; cin>>a;//具体的每一个数字 cout<<round(a/10)*10<<endl; } int n,x,y,m;//n书本数量,x老鼠每x小时吃一本,y时间 cin>>n>>x>>y; if(y%x==0){ m=n-y/x; }else{ m=n-y/x-1; } if(m>=0){ cout<<m; }else{ cout<<0; } **/ int a,b; cin>>a>>b; int i=a; while(true){ if(a%i ==0 and b % i==0){ cout<<i; return 0; } i--; } return 0; }