CCF——2019/12/15——第五題——魔数(10点)
1117 ワード
タイトルリンク
10点
/*10 ....*/
#include
#include
#include
#include
using namespace std;
const int M = 1e5;
int a[M];
int f(int x){
return x % 2019;
}
bool is_dig(char c){
if(c=='0' || c=='1' || c=='2' || c=='3' || c=='4' || c=='5' || c=='6' || c=='7' || c=='8' || c=='9'){
return true;
}
return false;
}
void f2(string s,int x){
for(int i=s.length(); i>0; i--){
if(s[i] )
}
}
int main(void)
{
string U0 = "314882150829468584";
string U1 = "427197303358170108";
string U2 ="1022292690726729920";
string U3 = "1698479428772363217";
string U4 = "2006101093849356424";
int n,q;
cin >> n >> q;
for(int i=1; i<=n; i++){
a[i] = i;
}
for(int i=0; i> l >> r;
int sum = 0;
for(int j=l; j<=r; j++){
sum += f(j);
}
cout << sum;
int t = sum % 5;
}
return 0;
}
10点