mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-07 18:06:58 +08:00
Update: Rename folder name to XSMOJ
This commit is contained in:
23
XSMOJ/找倍数.cpp
Normal file
23
XSMOJ/找倍数.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
int main(){
|
||||
int a,b,i;
|
||||
cin >>a>>b;
|
||||
for(i=a;i<=b;i++){
|
||||
if(i%7==0 && i%5!=0){
|
||||
cout <<i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(int j=i+1;j<=b;j++){
|
||||
if(j%7==0 && j%5!=0){
|
||||
cout <<","<<j;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user