結果
問題 | No.1009 面積の求め方 |
ユーザー |
![]() |
提出日時 | 2020-03-20 21:28:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 708 bytes |
コンパイル時間 | 1,480 ms |
コンパイル使用メモリ | 167,292 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 04:01:50 |
合計ジャッジ時間 | 2,206 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<pair<ll, ll>> pll; #define mod 1000000007 #define all(x) (x).begin(), (x).end() #define pb push_back #define popcount(x) __builtin_popcountll(x) const long double PI = acos(-1); ll gcd(ll a,ll b){return b ? gcd(b,a%b) : a;} ll lcm(ll a,ll b){return a / gcd(a,b) * b;} ll stringcount(string s, char c){return count(s.cbegin(), s.cend(), c);} bool isInteger(double x){return floor(x) == x;} int main(){ ios::sync_with_stdio(false); cin.tie(0); ll a, b; cin >> a >> b; double ans = 0; for(double x = a; x <= b; x += 0.0001){ ans += abs((x - a) * (x - b))*0.0001; } cout << ans << endl; return 0; }