2019-11-13から1日間の記事一覧
問題:B - Stone Monument #include <iostream> using namespace std; int main(void) { int a, b; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b; cout << (b - a) * (b - a + 1) / 2 - b << "\n"; return 0; }</iostream>
問題:B - Stone Monument #include <iostream> using namespace std; int main(void) { int a, b; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b; cout << (b - a) * (b - a + 1) / 2 - b << "\n"; return 0; }</iostream>