답안 #485822

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
485822 2021-11-09T13:18:52 Z groupATSU Trol (COCI19_trol) C++14
0 / 50
1 ms 316 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll inf=1e9;
const int maxn=100;
const ll mod=998244353;
int dp[maxn][maxn];
void solve(){
	int l,r;
	cin>>l>>r;
	l--;
	int c=r%9;
	int c1=l%9;
	int x1=(r/9)+(c*(c+1))/2;
	int x2=(l/9)+(c1*(c1+1))/2;
	cout<<x1-x2;
	
}

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
   	cin>>t;
    while(t--){
        solve();
        cout<<'\n';
    }


}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 316 KB Output isn't correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Incorrect 1 ms 204 KB Output isn't correct
4 Incorrect 0 ms 204 KB Output isn't correct
5 Incorrect 1 ms 204 KB Output isn't correct