Submission #66081692


Source Code Expand

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#include"atcoder/all"
using namespace atcoder;
typedef modint998244353 mi;
using namespace std;
#define all(a) a.begin(),a.end()
#define compress(a) sort(all(a));a.erase(unique(all(a)),a.end())
typedef long long ll;
typedef pair<ll,ll> P;
constexpr ll mod=998244353;
constexpr ll inf=3e18;

int main(){
	int c=0;
	int x,y;
	cin>>x>>y;
	for(int i=1;i<=6;i++){
		for(int j=1;j<=6;j++){
			if(i+j>=x || abs(i-j)>=y)c++;
		}
	}
	cout<<fixed<<setprecision(9)<<(double)c/36.0<<endl;
}

Submission Info

Submission Time
Task B - P(X or Y)
User Rho17
Language C++ 20 (gcc 12.2)
Score 250
Code Size 566 Byte
Status AC
Exec Time 12 ms
Memory 3916 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 250 / 250
Status
AC × 3
AC × 17
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 12 ms 3772 KiB
00_sample_01.txt AC 1 ms 3780 KiB
00_sample_02.txt AC 1 ms 3780 KiB
01_random_03.txt AC 1 ms 3696 KiB
01_random_04.txt AC 1 ms 3740 KiB
01_random_05.txt AC 1 ms 3760 KiB
01_random_06.txt AC 1 ms 3696 KiB
01_random_07.txt AC 1 ms 3748 KiB
01_random_08.txt AC 1 ms 3764 KiB
01_random_09.txt AC 1 ms 3844 KiB
01_random_10.txt AC 1 ms 3820 KiB
01_random_11.txt AC 1 ms 3632 KiB
01_random_12.txt AC 1 ms 3772 KiB
01_random_13.txt AC 1 ms 3916 KiB
01_random_14.txt AC 1 ms 3756 KiB
01_random_15.txt AC 1 ms 3748 KiB
01_random_16.txt AC 1 ms 3760 KiB