Submission #14033441


Source Code Expand

Copy
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

signed main(void)
{
	ll c, d, ans;
	ll start = 140, end = 170;
	cin >> c >> d;
	ans = 0;
	while (start < d)
	{
		ans += max(0LL, min(end, d) - max(start, c));
		start *= 2;
		end *= 2;
	}
	cout << ans << endl;
	return 0;
}

Submission Info

Submission Time
Task A - Feel the Beat
User king_of_coder
Language C++14 (GCC 5.4.1)
Score 300
Code Size 359 Byte
Status
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 a01, a02, a03
All 300 / 300 a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15
Case Name Status Exec Time Memory
a01 1 ms 256 KB
a02 1 ms 256 KB
a03 1 ms 256 KB
b04 1 ms 256 KB
b05 1 ms 256 KB
b06 1 ms 256 KB
b07 1 ms 256 KB
b08 1 ms 256 KB
b09 1 ms 256 KB
b10 1 ms 256 KB
b11 1 ms 256 KB
b12 1 ms 256 KB
b13 1 ms 256 KB
b14 1 ms 256 KB
b15 1 ms 256 KB