Submission #20521406
Source Code Expand
#include <bits/stdc++.h>
#define REP(i, N) for(int i = 0; i < (int)N; i++)
#define CREP(i, l, r) for(int i = l; i <= r; i++)
using namespace std;
typedef long long ll;
typedef tuple<int,int,int> T;
typedef pair<int,int> P;
typedef vector<int> V;
typedef vector<ll> VLL;
const int INF = 1000000000; //10^9, 2*INF
const ll LLINF = (1LL << 60); // > 10^18 ll 2*LLINF
int main() {
int a,b;
cin >> a >> b;
//VLL a(n); rep(i, n) scanf("%lld", &a[i]);
double res = 100.0*(1.0-((double)b)/a);
printf("%.10lf\n", res);
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Discount |
| User | samari06 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 571 Byte |
| Status | AC |
| Exec Time | 6 ms |
| Memory | 3764 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 01_sample.txt, 02_sample.txt, 03_sample.txt |
| All | 01_sample.txt, 02_sample.txt, 03_sample.txt, 04_hand.txt, 05_hand.txt, 06_hand.txt, 07_random.txt, 08_random.txt, 09_random.txt, 10_random.txt, 11_random.txt, 12_random.txt, 13_random.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01_sample.txt | AC | 6 ms | 3648 KiB |
| 02_sample.txt | AC | 2 ms | 3764 KiB |
| 03_sample.txt | AC | 2 ms | 3628 KiB |
| 04_hand.txt | AC | 2 ms | 3760 KiB |
| 05_hand.txt | AC | 2 ms | 3724 KiB |
| 06_hand.txt | AC | 3 ms | 3512 KiB |
| 07_random.txt | AC | 2 ms | 3520 KiB |
| 08_random.txt | AC | 2 ms | 3652 KiB |
| 09_random.txt | AC | 4 ms | 3648 KiB |
| 10_random.txt | AC | 2 ms | 3512 KiB |
| 11_random.txt | AC | 3 ms | 3748 KiB |
| 12_random.txt | AC | 5 ms | 3652 KiB |
| 13_random.txt | AC | 3 ms | 3628 KiB |