답안 #975269

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
975269 2024-05-04T16:21:15 Z vjudge1 Trol (COCI19_trol) C++17
0 / 50
1000 ms 432 KB
#include<bits/stdc++.h>
#define pii pair<int,int>
#define fi first
#define se second
#define int long long
using namespace std;
const int maxn=1e5+5;
signed main() {
	int q; cin>>q;
	while(q--) {
		int l,r; cin>>l>>r;
		if(l==r) cout<<l%9<<"\n";
		else {
			int ans=0;
			for(int i=l; i<=r; i++) {
				ans+=i%9;
			}
			cout<<ans<<"\n";
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Incorrect 1 ms 348 KB Output isn't correct
3 Incorrect 1 ms 348 KB Output isn't correct
4 Execution timed out 1092 ms 432 KB Time limit exceeded
5 Execution timed out 1073 ms 348 KB Time limit exceeded