結果
問題 | No.1076 寿司打 |
ユーザー |
![]() |
提出日時 | 2020-06-18 11:33:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 778 bytes |
コンパイル時間 | 1,696 ms |
コンパイル使用メモリ | 166,660 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-03 12:42:14 |
合計ジャッジ時間 | 2,014 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll=long long;#define rep(i,n) for(int i = 0; i < (int)(n); i++)#define All(a) a.begin(),a.end()#define INF 1000000007const ll MOD = 1000000007;//accumulate(vec.begin(), vec.end(), 0)//std::sort(v.begin(), v.end(), std::greater<Type>());//set_intersection(x, x+7, y, y+6, back_inserter(v));//set_union(x, x+7, y, y+6, back_inserter(v));//set_difference(x, x+7, y, y+6, back_inserter(v));int gcd(int x,int y){if(x%y==0) return y;else return gcd(y,x%y);}bool isPrime(int n){if(n < 2) return false;else if(n == 2) return true;else if(n%2==0) return false;for(int i=3;i<=sqrt(n);i++){if(n%i==0) return false;}return true;}int main(){double p;cin >> p;cout<< p/(1-p) <<endl;}