Submission #997783


Source Code Expand

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>

#define FOR(i, a, b) for(int (i)=(a); (i)<(b); (i)++)
#define IFOR(i, a, b) for(int (i)=(a);(i)<=(b);(i)++)
#define RFOR(i, a, b) for(int (i)=(a);(i)>=(b);(i)--)

using namespace std;

int main() {
	int x, p;
	cin >> x >> p;
	if (p == 100) {
		int tim = (x+1) / 2;
		cout << tim << endl;
		return 0;
	}

	double pp = p / 100.0;
	// 奇数
	if (x % 2) {
		printf("%.14f\n", (double)(1 - pp) / pp + 1 + (double)(x/2) / pp);
	}
	else
		printf("%.14f\n", (double)(x/2) / pp);

	return 0;
}

Submission Info

Submission Time
Task A - Takahashi is Missing!
User peradfn1126
Language C++14 (GCC 5.4.1)
Score 700
Code Size 964 Byte
Status AC
Exec Time 3 ms
Memory 256 KB

Judge Result

Set Name Sample Dataset1 Dataset2 Dataset3
Score / Max Score 0 / 0 200 / 200 300 / 300 200 / 200
Status
AC × 3
AC × 7
AC × 10
AC × 23
Set Name Test Cases
Sample subtask_01_ex1.txt, subtask_03_ex2.txt, subtask_04_ex3.txt
Dataset1 subtask_01_02.txt, subtask_01_03.txt, subtask_01_04.txt, subtask_01_ex1.txt, subtask_02_01.txt, subtask_02_02.txt, subtask_02_03.txt
Dataset2 subtask_01_02.txt, subtask_01_03.txt, subtask_01_04.txt, subtask_01_ex1.txt, subtask_03_01.txt, subtask_03_02.txt, subtask_03_03.txt, subtask_03_04.txt, subtask_03_05.txt, subtask_03_ex2.txt
Dataset3 subtask_01_02.txt, subtask_01_03.txt, subtask_01_04.txt, subtask_01_ex1.txt, subtask_02_01.txt, subtask_02_02.txt, subtask_02_03.txt, subtask_03_01.txt, subtask_03_02.txt, subtask_03_03.txt, subtask_03_04.txt, subtask_03_05.txt, subtask_03_ex2.txt, subtask_04_01.txt, subtask_04_02.txt, subtask_04_03.txt, subtask_04_04.txt, subtask_04_05.txt, subtask_04_06.txt, subtask_04_07.txt, subtask_04_08.txt, subtask_04_09.txt, subtask_04_ex3.txt
Case Name Status Exec Time Memory
subtask_01_02.txt AC 3 ms 256 KB
subtask_01_03.txt AC 3 ms 256 KB
subtask_01_04.txt AC 3 ms 256 KB
subtask_01_ex1.txt AC 3 ms 256 KB
subtask_02_01.txt AC 3 ms 256 KB
subtask_02_02.txt AC 2 ms 256 KB
subtask_02_03.txt AC 2 ms 256 KB
subtask_03_01.txt AC 3 ms 256 KB
subtask_03_02.txt AC 2 ms 256 KB
subtask_03_03.txt AC 3 ms 256 KB
subtask_03_04.txt AC 2 ms 256 KB
subtask_03_05.txt AC 3 ms 256 KB
subtask_03_ex2.txt AC 2 ms 256 KB
subtask_04_01.txt AC 2 ms 256 KB
subtask_04_02.txt AC 3 ms 256 KB
subtask_04_03.txt AC 3 ms 256 KB
subtask_04_04.txt AC 3 ms 256 KB
subtask_04_05.txt AC 2 ms 256 KB
subtask_04_06.txt AC 2 ms 256 KB
subtask_04_07.txt AC 3 ms 256 KB
subtask_04_08.txt AC 2 ms 256 KB
subtask_04_09.txt AC 2 ms 256 KB
subtask_04_ex3.txt AC 2 ms 256 KB