Submission #12183984


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;
using lint = long long;

signed main(){
  lint C, D; cin >> C >> D;
  lint start = 140, end = 170;
  lint ans = 0;
  while(1){
    if(start >= D) break;
    if(start < D){
      if(start >= C) ans += min(D - start, end - start);
      if(start < C){
        if(end >= C) ans += (end - C);
      }
    }
    start *= 2; end *= 2;
  }
  cout << ans << endl;
}

Submission Info

Submission Time
Task A - Feel the Beat
User a0171610
Language C++14 (GCC 5.4.1)
Score 300
Code Size 421 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