buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
import math as m
[A, B, H, M] = list(map(int, input().split()))
H_d = H * 30
M_d = M * 6
C = abs(H_d - M_d)
if C >= 180:
C = 360 - C
cosC = m.cos(m.radians(C))
answer = (A ** 2 + B ** 2 - 2 * A * B * cosC) ** 0.5
print(answer) | import math as m
[A, B, H, M] = list(map(int, input().split()))
H_d = H * 30 + 0.5 * M
M_d = M * 6
C = abs(H_d - M_d)
if C >= 180:
C = 360 - C
cosC = m.cos(m.radians(C))
answer = (A ** 2 + B ** 2 - 2 * A * B * cosC) ** 0.5
print(answer)
| [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 531], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 22]] | 5 | 95 |
a,b,h,m = gets.split(' ').map(&:to_i)
h=h.to_f
m=m.to_f
#puts 90 * Math::PI / 180
#puts Math.cos(90 * Math::PI / 180)
#d = ((h * 5.0 + m / 12.0) - m).abs #* 60
lt = (h * 30.0) + (m * 0.5)
st = m * 6.0
d=(lt-st).abs
if d>180.0
d = d-180.0
end
#puts lt
#puts st
#puts d
#rad = d * Math::PI / 180.0
#puts 2 * b * a * Math... | a,b,h,m = gets.split(' ').map(&:to_i)
h=h.to_f
m=m.to_f
#puts 90 * Math::PI / 180
#puts Math.cos(90 * Math::PI / 180)
#d = ((h * 5.0 + m / 12.0) - m).abs #* 60
lt = (h * 30.0) + (m * 0.5)
st = m * 6.0
d=(lt-st).abs
if d>180.0
d = 360.0 -d
end
#puts lt
#puts st
#puts d
#rad = d * Math::PI / 180.0
#puts 2 * b * a * Mat... | [["-", 0, 121, 64, 749, 0, 662, 12, 738, 31, 22], ["+", 0, 121, 64, 749, 0, 662, 12, 738, 31, 531], ["-", 0, 121, 64, 749, 0, 662, 12, 738, 12, 531], ["+", 0, 121, 64, 749, 0, 662, 12, 738, 12, 22]] | 4 | 110 |
# C
import math
#A:短針,B:長針,H:短針の位置,M:長針の位置
A,B,H,M = map(int,input().split(' '))
rad = abs(H*30-M*6)
rad = math.radians(min(rad,360-rad))
print('{:.20f}'.format((A**2 + B**2 - 2*A*B*math.cos(rad))**0.5)) | # C
import math
#A:短針,B:長針,H:短針の位置,M:長針の位置
A,B,H,M = map(int,input().split(' '))
rad = abs((H*30+M/2)-M*6)
rad = math.radians(min(rad,360-rad))
print('{:.20f}'.format((A**2 + B**2 - 2*A*B*math.cos(rad))**0.5)) | [["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 31, 22], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 17, 85], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25]] | 5 | 88 |
// abc168_c
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include ... | // abc168_c
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include ... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 396 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double A = sc.nextInt();
double B = sc.nextInt();
double H = sc.nextInt();
double M = sc.nextInt();
double radH = 2 * Math.PI * (H / 12 + M / 60 / 12);
double radM = 2 * Math.... |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double A = sc.nextInt();
double B = sc.nextInt();
double H = sc.nextInt();
double M = sc.nextInt();
double radH = 2 * Math.PI * (H / 12 + M / 60 / 12);
double radM = 2 * Math.... | [["-", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 21]] | 3 | 213 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define all(x) (x).begin(), (x).end()
#define eb emplace_back
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define rep(x, y, z) for (int x = y; x < z; x++)
#define per(x, z, y) for (int x... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define all(x) (x).begin(), (x).end()
#define eb emplace_back
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define rep(x, y, z) for (int x = y; x < z; x++)
#define per(x, z, y) for (int x... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]] | 1 | 221 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
double pi = acos(-1);
int A, B, H, M;
cin >> A >> B >> H >> M;
double hangle = double(H * 60 + M) / 720 * 2 * pi;
double mangle = double(M * 60) * 2 * pi;... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
double pi = acos(-1);
int A, B, H, M;
cin >> A >> B >> H >> M;
double hangle = double(H * 60 + M) / 720 * 2 * pi;
double mangle = double(M) / 60 * 2 * pi;... | [["-", 31, 16, 31, 2, 3, 4, 0, 16, 17, 48], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 31, 16, 31, 16, 17, 85], ["+", 49, 50, 51, 16, 31, 16, 31, 16, 12, 13]] | 1 | 145 |
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
const double pi = 3.14159265358979323846;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll a, b, h, m;
cin >> a >> b >> h >> m;
ll hour, minutes;
double h1, m1, angle;
hour = h;
minutes = m;
h1 = (hour % 12 * 30) +... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
const double pi = 3.14159265358979323846;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll a, b, h, m;
cin >> a >> b >> h >> m;
ll hour, minutes;
double h1, m1, angle;
hour = h;
minutes = m;
h1 = (hour % 12 * 30) +... | [["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 180 |
import math
def abs(x):
return x if x >= 0 else x < 0 -x
a,b,h,m = (int(x) for x in input().split())
x = 30 * h + 0.5 * m
y = 6 * m
ang = abs(x - y)
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(ang)))) | import math
def abs(x):
return x if x >= 0 else -x
a,b,h,m = (int(x) for x in input().split())
x = 30 * h + 0.5 * m
y = 6 * m
ang = abs(x - y)
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(ang)))) | [["-", 8, 196, 0, 37, 0, 41, 0, 666, 0, 22], ["-", 8, 196, 0, 37, 0, 41, 0, 666, 667, 18], ["-", 0, 37, 0, 41, 0, 666, 0, 657, 31, 612]] | 5 | 99 |
import math
a, b, h, m = map(int, input().split())
#c = (h/6 - m/360)*math.pi
c = 11.0/360.0*(60*h+m)*pi
x = math.sqrt(a * a + b * b - 2 * a * b * math.cos(c))
print(x)
#double c = (h/6 - m/360)*pi;
#x = sqrt(a * a + b * b - 2 * a * b * cos(c));
#cout << fixed << setprecision(15) << x << endl;
| import math
a, b, h, m = map(int, input().split())
#c = (h/6 - m/360)*math.pi
c = 11.0/360.0*(60*h+m)*math.pi
x = math.sqrt(a * a + b * b - 2 * a * b * math.cos(c))
print(x)
#double c = (h/6 - m/360)*pi;
#x = sqrt(a * a + b * b - 2 * a * b * cos(c));
#cout << fixed << setprecision(15) << x << endl;
| [["+", 0, 1, 0, 662, 12, 657, 12, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 319, 0, 131]] | 5 | 72 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ppb pop_back
#define endl '\n'
#define mii map<ll int, ll int>
#define msi map<string, ll int>
#define mis map<ll int, string>
#define rep(i, a, b) for (ll int i = a; i < b; i++)
#define repp(i, a, b) for (ll int i = b - 1; i >= a; i--)
#define ... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ppb pop_back
#define endl '\n'
#define mii map<ll int, ll int>
#define msi map<string, ll int>
#define mis map<ll int, string>
#define rep(i, a, b) for (ll int i = a; i < b; i++)
#define repp(i, a, b) for (ll int i = b - 1; i >= a; i--)
#define ... | [["-", 49, 50, 51, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 316 |
import math
# from itertools import permutations,combinations,combinations_with_replacement
# from collections import deque,Counter
# import re
# from bisect import bisect_left
# from heapq import heappush,heappop
# from numba import njit
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from fractio... | import math
# from itertools import permutations,combinations,combinations_with_replacement
# from collections import deque,Counter
# import re
# from bisect import bisect_left
# from heapq import heappush,heappop
# from numba import njit
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from fractio... | [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 531], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 22]] | 5 | 108 |
#include <bits/stdc++.h>
using namespace std;
#define max(a, b) ((a > b) ? a : b);
#define min(a, b) ((b > a) ? a : b);
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define pu push
#define pp pop_back
#define in insert
#define forn(low, high, i) for (i = low; i < hi... | #include <bits/stdc++.h>
using namespace std;
#define max(a, b) ((a > b) ? a : b);
#define min(a, b) ((b > a) ? a : b);
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define pu push
#define pp pop_back
#define in insert
#define forn(low, high, i) for (i = low; i < hi... | [["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22], ["-", 31, 16, 31, 74, 51, 23, 0, 16, 31, 22], ["-", 31, 16, 31, 74, 51, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 74, 51, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 74, 51, 23, 0, 16, 12, 22]] | 1 | 336 |
from math import sin,cos,pi
def main():
#入力
readline=stdin.readline
A,B,H,M=map(int,readline().split())
s=M*pi/30
t=(H/6)*pi+(M/360)*pi
x_A=A*sin(t)
y_A=A*cos(t)
x_B=B*sin(s)
y_B=B*cos(s)
print(((x_A-x_B)**2+(y_A-y_B)**2)**0.5)
if __name__=="__main__":
main() | from sys import stdin
from math import sin,cos,pi
def main():
#入力
readline=stdin.readline
A,B,H,M=map(int,readline().split())
s=M*pi/30
t=(H/6)*pi+(M/360)*pi
x_A=A*sin(t)
y_A=A*cos(t)
x_B=B*sin(s)
y_B=B*cos(s)
print(((x_A-x_B)**2+(y_A-y_B)**2)**0.5)
if __name__=="__main__... | [["+", 36, 36, 0, 656, 0, 686, 687, 673, 0, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 487], ["+", 36, 36, 0, 656, 0, 686, 141, 673, 0, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 314]] | 5 | 127 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
// #define int long long
template <class T> bool INRANGE(T x, T a, T b) { return a <= x && x <= b; }
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chma... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
// #define int long long
template <class T> bool INRANGE(T x, T a, T b) { return a <= x && x <= b; }
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chma... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["-", 31, 74, 51, 23, 0, 16, 31, 16, 31, 13], ["+",... | 1 | 334 |
#-*-coding:utf-8-*-
import math
def calculate_length(A,B,theta):
radian=math.radians(theta)
length=(A**2)+(B**2)-(2*A*B*math.cos(radian))
return math.sqrt(length)
def main():
A,B,H,M = map(int,input().split())
thetaA=H*30+M*0.5
thetaB=M*6
if thetaA == thetaB:
print(abs(thetaA-the... | #-*-coding:utf-8-*-
import math
def calculate_length(A,B,theta):
radian=math.radians(theta)
length=(A**2)+(B**2)-(2*A*B*math.cos(radian))
return math.sqrt(length)
def main():
A,B,H,M = map(int,input().split())
thetaA=H*30+M*0.5
thetaB=M*6
if thetaA == thetaB:
print(abs(A-B))
e... | [["-", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 155 |
import math
def main() :
A, B, H, M = list(map(int, input().split()))
theta = abs((H+ M/ 60)* 30- M* 6)
print(theta)
result = B**2 + A**2 - 2* B* A* math.cos(math.radians(theta))
result = math.sqrt(result)
print('{:.020f}'.format(result))
if __name__ == "__main__":
main() | import math
def main() :
A, B, H, M = list(map(int, input().split()))
theta = abs((H+ M/ 60)* 30- M* 6)
#print(theta)
result = B**2 + A**2 - 2* B* A* math.cos(math.radians(theta))
result = math.sqrt(result)
print('{:.020f}'.format(result))
if __name__ == "__main__":
main() | [["-", 0, 14, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 108 |
#include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
long double q = (h * 30) + (0.5 * m) - (m * 6);
long double param, result;
param = q;
result = cos(param * PI / 180.0);
long double w = pow(a, 2) + pow(b, 2) - (2 * a * b * re... | #include <bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793238
int main() {
long double a, b, h, m;
cin >> a >> b >> h >> m;
long double q = (h * 30) + (0.5 * m) - (m * 6);
long double param, result;
param = q;
result = cos(param * PI / 180.0);
long double w = pow(a, 2) + pow(b, 2) - (2 * ... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]] | 1 | 125 |
import math
a,b,h,m = map(int,input().split())
long = m/60*360
short = h*30+(m/60*30)
kakudo = abs(long-short)
if kakudo > 180:
kakudo -= 180
ans = math.sqrt(a**2 + b**2 - (2*a*b*math.cos(math.radians(kakudo))))
print(ans) | import math
a,b,h,m = map(int,input().split())
long = m/60*360
short = h*30+(m/60*30)
kakudo = abs(long-short)
if kakudo > 180:
kakudo = 360-kakudo
ans = math.sqrt(a**2 + b**2 - (2*a*b*math.cos(math.radians(kakudo))))
print(ans)
| [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 96 |
import math
a,b,h,m=map(int, input().split())
d = 30*(h+m/60)-6*m
e = 360-d
f = int(min(d,e))
y = math.cos(math.radians(f))
x = a**2+b**2-2*a*b*y
z = float(math.sqrt(x))
print("{0:.20f}".format(z)) | import math
a,b,h,m=map(int, input().split())
d = 30*(h+m/60)-6*m
e = 360-d
f = min(d,e)
y = math.cos(math.radians(f))
x = a**2+b**2-2*a*b*y
z = float(math.sqrt(x))
print("{0:.20f}".format(z)) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 105 |
#include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
using namespace std;
int main() {
int a, b, h, m, x;
double y, z;
cin >> a >> b >> h >> m;
x = 60 * h + m;
y = (11.00000000000 / 360.00000000000) * PI * x;
z = ... | #include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
using namespace std;
int main() {
int a, b, h, m, x;
double y, z;
cin >> a >> b >> h >> m;
x = 60 * h + m;
y = (11.0 / 360.0) * PI * x;
z = sqrt(a * a + b * b -... | [["-", 12, 16, 31, 16, 31, 23, 0, 16, 31, 13], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 31, 13], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22], ["-", 0, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 118 |
#include <math.h>
#include <stdio.h>
int main() {
double h, m;
double k;
double ans;
double a, b;
scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
k = h * 30 - 5.5;
if (k < 0)
k = k * (-1);
if (k > 180)
k = 360 - k;
k = k * M_PI / 180;
ans = (a * a) + (b * b) - (2 * a * b * cos(k));
printf("%... | #include <math.h>
#include <stdio.h>
int main() {
double h, m;
double k;
double ans;
double a, b;
scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
k = h * 30 - (m * 5.5);
if (k < 0)
k = k * (-1);
if (k > 180)
k = 360 - k;
k = k * M_PI / 180;
ans = (a * a) + (b * b) - (2 * a * b * cos(k));
pri... | [["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 0 | 129 |
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
static const double pi = 3.141592653589793;
int l, s, h, m;
cin >> l >> s >> h >> m;
printf("%lf\n",
sqrt(((double)l * (double)l) + ((double)s * (double)s) -
(2 * (double)l * (double)s *
... | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
static const double pi = 3.141592653589793;
int l, s, h, m;
cin >> l >> s >> h >> m;
printf("%2.9lf\n",
sqrt(((double)l * (double)l) + ((double)s * (double)s) -
(2 * (double)l * (double)s *
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 137 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> V;
#define rep(cnt, e) for (ll cnt = 0; cnt < e; cnt++)
typedef pair<ll, ll> P;
const ll mod = 1e9 + 7;
const ll smod = 998244353;
const ll INF = INT64_MAX;
typedef tuple<ll, ll, ll, ll> T;
ll i, j, k;
int main() {
//オーバーフローに注意!
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> V;
#define rep(cnt, e) for (ll cnt = 0; cnt < e; cnt++)
typedef pair<ll, ll> P;
const ll mod = 1e9 + 7;
const ll smod = 998244353;
const ll INF = INT64_MAX;
typedef tuple<ll, ll, ll, ll> T;
ll i, j, k;
int main() {
//オーバーフローに注意!
... | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 110], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 64, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 64, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]] | 1 | 208 |
import numpy as np
import math
from sys import stdin
def get_result(data):
A, B, H, M = data
h_deg = (H + M/60) * 30.0
m_deg = M * 6.0
theta = math.radians(abs(m_deg-h_deg) % 180)
# print(abs(m_deg-h_deg))
# print(abs(m_deg-h_deg) % 180)
ans = np.sqrt(np.float128(A**2+B**2 - 2*A*B*math.cos... | import numpy as np
import math
from sys import stdin
def get_result(data):
A, B, H, M = data
h_deg = (H + M/60.0) * 30.0
m_deg = M * 6.0
theta = math.radians(abs(m_deg-h_deg))
ans = np.sqrt(np.float128(A**2+B**2 - 2*A*B*math.cos(theta)))
return ans
if __name__ == '__main__':
data = list(... | [["-", 12, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 12, 657, 31, 23, 0, 657, 12, 657, 12, 531], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 109], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 135 |
a,b,h,m = map(int,input().split())
import math
h_pi = 30 * h + 0.5 * m
m_pi = 6 * m
theta =max(h_pi,m_pi) - min(h_pi,m_pi)
ans = a**2 + b**2 -2 * a * b * math.cos(theta)
print(math.sqrt(ans)) | a,b,h,m = map(int,input().split())
import math
h_pi = 30 * h + 0.5 * m
m_pi = 6 * m
theta =max(h_pi,m_pi) - min(h_pi,m_pi)
ans = a**2 + b**2 -2 * a * b * math.cos(math.radians(theta))
print(math.sqrt(ans)) | [["+", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 82 |
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using LD = long double;
LL mod = 998244353;
const LD pi = 3.141592653589793238;
int main() {
LL a, b, h, m;
cin >> a >> b >> h >> m;
LD hang = (pi / 6) * h + (pi / 360) * m;
LD mang = (pi / 30) * m;
LD ang = abs(hang - mang);
ang = mi... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using LD = long double;
LL mod = 998244353;
const LD pi = 3.141592653589793238;
int main() {
LL a, b, h, m;
cin >> a >> b >> h >> m;
LD hang = (pi / 6) * h + (pi / 360) * m;
LD mang = (pi / 30) * m;
LD ang = abs(hang - mang);
ang = mi... | [["+", 12, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 48]] | 1 | 145 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using mti = vector<vector<int>>;
using vl = vector<ll>;
using mtl = vector<vector<ll>>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
#define all(x) x.begin(), x.end()
#define rep(i, j, n) for (int i = j; i < (int)(n); i++... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using mti = vector<vector<int>>;
using vl = vector<ll>;
using mtl = vector<vector<ll>>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
#define all(x) x.begin(), x.end()
#define rep(i, j, n) for (int i = j; i < (int)(n); i++... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 321 |
A,B,H,M = list(map(int,input().split()))
import math
x = abs((30*H + 30*M/60) -6*M)
if x > 180:
x = x - 180
c = A*A + B*B - (2*A*B*(math.cos(math.radians(x))))
print(c**0.5) | A,B,H,M = list(map(int,input().split()))
import math
x = abs((30*H + 30*M/60) -6*M)
if x >= 180:
x = 360-x
c = A*A + B*B - (2*A*B*(math.cos(math.radians(x))))
print(c**0.5) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 92 |
import math
a, b, h, m = map(int, input().split())
pi = math.pi
ht = h*pi/6
mt = m*pi/30
if ht >= mt:
theta = ht -mt
else:
theta = mt - ht
ll = a**2 + b**2 -2*a*b*math.cos(theta)
print(math.sqrt(ll))
| import math
a, b, h, m = map(int, input().split())
pi = math.pi
ht = h*pi/6+m*pi/360
mt = m*pi/30
if ht >= mt:
theta = ht -mt
else:
theta = mt - ht
ll = a**2 + b**2 -2*a*b*math.cos(theta)
print(math.sqrt(ll))
| [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 31, 22], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 17, 48], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]] | 5 | 89 |
#include <math.h>
#include <stdio.h>
int main() {
double A, B, H, M;
double distance, HH;
double theta, phi;
double CC;
distance = 1000;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
// HH = H/12;
// printf("%lf\n",H);
// printf("2*M_PI = %lf\n",2*M_PI);
// printf("(H/12) = %lf\n",HH);
theta = 2 * M_... | #include <math.h>
#include <stdio.h>
int main() {
double A, B, H, M;
double distance, HH;
double theta, phi;
double CC;
distance = 1000;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
// HH = H/12;
// printf("%lf\n",H);
// printf("2*M_PI = %lf\n",2*M_PI);
// printf("(H/12) = %lf\n",HH);
theta = 2 * M_... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 158 |
import numpy as np
a,b,h,m=map(int, input().split())
min = h*60 + m
rada = np.radians(90-min*0.5)
acos = np.cos(rada)
x1 = a * acos
asin = np.sin(rada)
y1 = a * asin
radb = np.radians(90-m*6)
bcos = np.cos(radb)
x2 = b * bcos
bsin = np.sin(radb)
y2 = b * bsin
A = np.array([x1, y1])
B = np.array([x2, y2])
u = B-A
np.... | import numpy as np
a,b,h,m=map(int, input().split())
min = h*60 + m
rada = np.radians(90-min*0.5)
acos = np.cos(rada)
x1 = a * acos
asin = np.sin(rada)
y1 = a * asin
radb = np.radians(90-m*6)
bcos = np.cos(radb)
x2 = b * bcos
bsin = np.sin(radb)
y2 = b * bsin
A = np.array([x1, y1])
B = np.array([x2, y2])
u = B-A
pri... | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 144 |
import math
A,B,H,M = map(int,input().split())
a = 30*H + 0.5*M
b = M*6
if abs(a-b) > 180:
ab = abs(a-b)
else:
ab = abs(360-a-b)
ab1 = round(math.cos(math.radians(ab)),20)
ans = round(math.sqrt(A**2 + B**2 - 2 * A* B*ab1),20)
print(round(ans,20)) | import math
A,B,H,M = map(int,input().split())
a = 30*H + 0.5*M
b = M*6
if abs(a-b) < 180:
ab = abs(a-b)
else:
ab = 360 - abs(a-b)
ab1 = round(math.cos(math.radians(ab)),20)
ans = round(math.sqrt(A**2 + B**2 - 2 * A* B*ab1),20)
print(round(ans,20)) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 652, 63, 22], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 24]] | 5 | 120 |
import sys
import math
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B, H, M = map(int, input().split())
AX = (30.0 * H + M) / 2.0
BX = M * 6.0
D = AX - BX
ANS = A ** 2 + B ** 2 - 2 * B * A * math.cos(math.radians(D))
pr... | import sys
import math
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B, H, M = map(int, input().split())
AX = 30.0 * H + M / 2.0
BX = M * 6.0
D = AX - BX
ANS = A ** 2 + B ** 2 - 2 * B * A * math.cos(math.radians(D))
prin... | [["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]] | 5 | 116 |
import sys
import math
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B, H, M = map(int, input().split())
H = H % 12
X = H * 60 + M
AX = X / 720.0 * 360
BX = M / 60.0 * 360
D = abs(AX - BX + (10 ** -6))
ANS = A ** 2 + B *... | import sys
import math
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B, H, M = map(int, input().split())
H = H % 12
X = H * 60 + M
AX = X / 720.0 * 360
BX = M / 60.0 * 360
D = abs(AX - BX + (10 ** -12))
ANS = A ** 2 + B ... | [["-", 0, 657, 12, 23, 0, 657, 12, 664, 28, 612], ["+", 0, 657, 12, 23, 0, 657, 12, 664, 28, 612]] | 5 | 136 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, H, M;
double C, d;
cin >> A;
cin >> B;
cin >> H;
cin >> M;
d = abs(60 * H - 11 * M) / 30.0;
if (d == 0) {
cout << abs(B - A) << endl;
} else if (d == 1) {
cout << A + B << endl;
} else if (d < 1) {
C = sqrt(
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, H, M;
double C, d;
cin >> A;
cin >> B;
cin >> H;
cin >> M;
d = abs(60 * H - 11 * M) / 30.0;
if (d == 0) {
cout << abs(B - A) << endl;
} else if (d == 1) {
cout << A + B << endl;
} else if (d < 1) {
C = sqrt(
... | [["-", 31, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 31, 2, 3, 4, 0, 16, 31, 16, 31, 13]] | 1 | 229 |
import math
A, B, H, M = map(int, input().split())
short_v = 360 / (12*60)
long_v = 360 / 60
short_arg = (short_v * (H * 60) + short_v * M)
long_arg = long_v * M
theta = math.radians(abs(short_arg-long_arg)%180)
result_2 = A**2 + B**2 - 2*A*B*math.cos(theta)
print(math.sqrt(result_2))
| import math
A, B, H, M = map(int, input().split())
short_v = 360 / (12*60)
long_v = 360 / 60
short_arg = (short_v * (H * 60) + short_v * M)
long_arg = long_v * M
theta = math.radians(abs(short_arg-long_arg))
result_2 = A**2 + B**2 - 2*A*B*math.cos(theta)
print(math.sqrt(result_2))
| [["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 109], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 102 |
#include <math.h>
#include <stdio.h>
#define PI 3.14159265358979323846264338327950L
int main(void) {
int a, b, h, m;
scanf("%d%d%d%d", &a, &b, &h, &m);
long double rad =
2 * PI * ((long double)h / 12.0 - 11.0 * (long double)m / 720.0);
long double rsq =
(long double)(a * a + b * b) - (long double)(2... | #include <math.h>
#include <stdio.h>
#define PI 3.14159265358979323846264338327950L
int main(void) {
int a, b, h, m;
scanf("%d%d%d%d", &a, &b, &h, &m);
long double rad =
2 * PI * ((long double)h / 12.0 - 11.0 * (long double)m / 720.0);
long double rsq =
(long double)(a * a + b * b) - (long double)(2... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 120 |
a, b, h, m = gets.split.map(&:to_i)
def angle(h, m)
# 720 min => rotate
h_angle = 360.0 * (h * 60 + m) / 720.0
m_angle = 360.0 * (m / 60.0)
diff = (h_angle - m_angle).to_i.abs
diff = 360 - diff if diff > 180
return diff
end
def to_rad(angle)
angle * Math::PI / 180
end
# puts angle(h, m)
# puts (angle... | a, b, h, m = gets.split.map(&:to_i)
def angle(h, m)
# 720 min => rotate
h_angle = 360.0 * (h * 60 + m) / 720.0
m_angle = 360.0 * (m / 60.0)
diff = (h_angle - m_angle).abs
diff = 360 - diff if diff > 180
return diff
end
def to_rad(angle)
angle * Math::PI / 180
end
# puts angle(h, m)
# puts (angle(h, m... | [["-", 8, 736, 0, 662, 12, 652, 486, 652, 735, 22], ["-", 0, 735, 8, 736, 0, 662, 12, 652, 17, 131]] | 4 | 128 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
typedef long long LL;
typedef long double LD;
using namespace std;
int main() {
LD a, b, h, m, w1, w2, t1, t2, t3, l3;
cin >> a >> b >> h >> m;
w1 = (LD)2 * M_PI / 720.0;
w2 = (LD)2 * M_PI / 60.0;... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
typedef long long LL;
typedef long double LD;
using namespace std;
int main() {
LD a, b, h, m, w1, w2, t1, t2, t3, l3;
cin >> a >> b >> h >> m;
w1 = (LD)2 * M_PI / 720.0;
w2 = (LD)2 * M_PI / 60.0;... | [["-", 3, 4, 0, 16, 12, 2, 63, 23, 0, 22], ["-", 3, 4, 0, 16, 12, 2, 63, 23, 0, 25], ["-", 3, 4, 0, 16, 12, 2, 3, 4, 0, 24]] | 1 | 169 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
M += H * 60;
double theta_A = M * M_PI / 360.0, theta_B = M * M_PI / 3.0;
double x_A = A * cos(theta_A), y_A = A * sin(theta_A), x_B = B * cos(theta_B),
y_B = B * sin(theta_B);
double d = sqrt((x_A ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
M += H * 60;
double theta_A = M * M_PI / 360.0, theta_B = M * M_PI / 30.0;
double x_A = A * cos(theta_A), y_A = A * sin(theta_A), x_B = B * cos(theta_B),
y_B = B * sin(theta_B);
double d = sqrt((x_A... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 131 |
package main
import (
"fmt"
"math"
)
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
angle := math.Abs(30*h + 5.5*m - 6*m)
d := a*a + b*b - 2*a*b*math.Cos(angle*math.Pi/180)
d = math.Sqrt(d)
fmt.Println(d)
}
| package main
import (
"fmt"
"math"
)
func main() {
var a, b, h, m float64
fmt.Scan(&a, &b, &h, &m)
angle := math.Abs(30*h + 0.5*m - 6*m)
d := a*a + b*b - 2*a*b*math.Cos(angle*math.Pi/180)
d = math.Sqrt(d)
fmt.Println(d)
}
| [["-", 3, 4, 0, 16, 31, 16, 12, 16, 31, 445], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 31, 445]] | 7 | 113 |
import math
def main():
# S = input()
# N = int(input())
A,B,H,M = list(map(int, input().split(' ')))
# print(S, W)
A_zure = H / 12 * 360
B_zure = M / 60 * 360
A_zure += (15 / 60) * M
theta = abs(B_zure - A_zure)
theta = min(360-theta, theta)
# print(A_zure, B_zu... | import math
def main():
# S = input()
# N = int(input())
A,B,H,M = list(map(int, input().split(' ')))
# print(S, W)
A_zure = H / 12 * 360
B_zure = M / 60 * 360
A_zure += (30 / 60) * M
theta = abs(B_zure - A_zure)
theta = min(360-theta, theta)
# print(A_zure, B_zu... | [["-", 0, 677, 12, 657, 31, 23, 0, 657, 31, 612], ["+", 0, 677, 12, 657, 31, 23, 0, 657, 31, 612]] | 5 | 116 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define Pi 3.14159265
int main() {
int a, b, h, m;
double angle, ans;
cin >> a >> b >> h >> m;
angle = abs((h * 30.0 + (30.0 / 60.0) * m) - m * 6.0);
if (angle > 180.0) {
angle = 360.0 - ... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define Pi 3.14159265
int main() {
int a, b, h, m;
double angle, ans;
cin >> a >> b >> h >> m;
angle = abs((h * 30.0 + (30.0 / 60.0) * m) - m * 6.0);
if (angle > 180.0) {
angle = 360.0 - ... | [["-", 3, 4, 0, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 16, 31, 23, 0, 16, 31, 16, 12, 13], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 17, 48], ["+", 0, 16, 31, 23, 0, 16, 12, 2, 63, 22], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 133 |
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
const double PI = 3.14159265358979323846;
double square(double d) { return d * d; }
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
double hAngle = (H + M / 60.0) * PI / 6.0;
double mAngle = M * PI / 30.0;
cout << sqrt(square(A * cos(... | #include <bits/stdc++.h>
#include <cmath>
using namespace std;
const double PI = 3.14159265358979323846;
double square(double d) { return d * d; }
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
double hAngle = (H + M / 60.0) * PI / 6.0;
double mAngle = M * PI / 30.0;
cout << setprecision(32)
... | [["+", 0, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 117 |
//
// じょえチャンネル
// 高評価・チャンネル登録よろしくお願いします!
// https://www.youtube.com/watch?v=gPFr7q7eLL8
//
/*------------------------------------
∧_∧
∧_∧ (´<_` )
( ´_ゝ`) / ⌒i
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
-------------------------------------*/
#include <alg... | //
// じょえチャンネル
// 高評価・チャンネル登録よろしくお願いします!
// https://www.youtube.com/watch?v=gPFr7q7eLL8
//
/*------------------------------------
∧_∧
∧_∧ (´<_` )
( ´_ゝ`) / ⌒i
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
-------------------------------------*/
#include <alg... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 17, 48], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 12, 13]] | 1 | 1,787 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
using Graph = vector<vector<ll>>;
#define all(x) (x).begin(), (x).end() // string の sort とかはこれ
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
const ll MOD = 1000000007;
const ll INF = 1e18; // 1*10^18
const double PI ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
using Graph = vector<vector<ll>>;
#define all(x) (x).begin(), (x).end() // string の sort とかはこれ
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
const ll MOD = 1000000007;
const ll INF = 1e18; // 1*10^18
const double PI ... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13]] | 1 | 788 |
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int jisin, funsin, ji, fun;
cin >> jisin >> funsin >> ji >> fun;
static const double pi = 3.1415926535897932384;
double rangel;
double rangelji = (ji * 60 + fun) * (pi / 360);
// cout << rangelji<<... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int jisin, funsin, ji, fun;
cin >> jisin >> funsin >> ji >> fun;
static const double pi = 3.1415926535897932384;
double rangel;
double rangelji = (ji * 60 + fun) * (pi / 360);
// cout << rangelji<<... | [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22]] | 1 | 135 |
import math
s = input()
S = s.split()
A = int(S[0])
B = int(S[1])
H = int(S[2])
M = int(S[3])
Hang = H*30 + M*0.5
Mang = M*6
if abs(Hang-Mang) > 180:
Difang = abs(Hang - Mang) - 180
else:
Difang = abs(Hang - Mang)
Answ= A**2 + B**2 - 2*A*B*(math.cos(math.radians(Difang)))
print(math.sqrt(Answ)) | import math
s = input()
S = s.split()
A = int(S[0])
B = int(S[1])
H = int(S[2])
M = int(S[3])
Hang = H*30 + M*0.5
Mang = M*6
if abs(Hang-Mang) > 180:
Difang = 360 - abs(Hang - Mang)
else:
Difang = abs(Hang - Mang)
Answ= A**2 + B**2 - 2*A*B*(math.cos(math.radians(Difang)))
print(math.sqrt(Answ)) | [["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 132 |
a,b,h,m = gets.split.map(&:to_i)
rh = (h + m / 60.1) * 2 * Math::PI / 12
rm = m * 2 * Math::PI / 60
xa = a * Math.sin(rh)
xb = b * Math.sin(rm)
ya = a * Math.cos(rh)
yb = b * Math.cos(rm)
puts Math.sqrt((xa - xb)**2 + (ya - yb)**2)
| a,b,h,m = gets.split.map(&:to_i)
rh = (h + m / 60.0) * 2 * Math::PI / 12
rm = m * 2 * Math::PI / 60
xa = a * Math.sin(rh)
xb = b * Math.sin(rm)
ya = a * Math.cos(rh)
yb = b * Math.cos(rm)
puts Math.sqrt((xa - xb)**2 + (ya - yb)**2)
| [["-", 31, 738, 31, 739, 0, 738, 12, 738, 12, 531], ["+", 31, 738, 31, 739, 0, 738, 12, 738, 12, 531]] | 4 | 106 |
import math
a, b, h, m = map(int, input().split())
if h * 360 / 12 + m * 360 / 60 / 12 > m * 360 / 60:
r = h * 360 / 12 + m * 360 / 60 / 12 - m * 360 / 60
else:
r = m * 360 / 60 - h * 360 / 12 + m * 360 / 60 / 12
if r > 180:
r = 360 - r % 360
if r == 90:
t = a ** 2 + b ** 2
print(math.sqrt(t))
... | import math
a, b, h, m = map(int, input().split())
if h * 360 / 12 + m * 360 / 60 / 12 > m * 360 / 60:
r = (h * 360 / 12 + m * 360 / 60 / 12 )- m * 360 / 60
else:
r = m * 360 / 60 - (h * 360 / 12 + m * 360 / 60 / 12)
if r > 180:
r = 360 - r
if r == 90:
t = a ** 2 + b ** 2
print(math.sqrt(t))
el... | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 17, 109], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]] | 5 | 160 |
import math
A, B, H, M = [float(i) for i in input().split()]
C = float(abs(30.0*H + 0.50*M - 6.0*M))
if C > 180:
C -= 180.0
c2 = A*A + B*B - 2*A*B*(math.cos((C/180.0)*math.pi))
c2 = math.sqrt(c2)
print(f'{c2:.{15}f}') | import math
A, B, H, M = [float(i) for i in input().split()]
C = float(abs(30.0*H + 0.50*M - 6.0*M))
if C > 180:
C = 360.0 - C
c2 = A*A + B*B - 2*A*B*(math.cos((C/180.0)*math.pi))
c2 = math.sqrt(c2)
print(f'{c2:.{15}f}') | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 531], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 531], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 107 |
import numpy as np
A, B, H, M = map(int, input().split())
w_h = 360/12*H + 30/60*M #時針の角度(angle)
w_m = 360/60*M #分針の角度(angle)
dif_angle = abs(w_h-w_m)
if dif_angle >= 180:
dif_angle -= 180
rad = dif_angle/180*np.pi
C_2 = (A**2) + (B**2) - 2*A*B*np.cos(rad)
ans = np.sqrt(C_2)
print(ans)
| import numpy as np
A, B, H, M = map(int, input().split())
w_h = 360/12*H + 30/60*M #時針の角度(angle)
w_m = 360/60*M #分針の角度(angle)
dif_angle = abs(w_h-w_m)
if dif_angle >= 180:
dif_angle = 360 - dif_angle
rad = dif_angle/180*np.pi
C_2 = (A**2) + (B**2) - 2*A*B*np.cos(rad)
ans = np.sqrt(C_2)
print(ans)
| [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 109 |
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools
INF = 10 ** 10
# A:時
# B:分
A, B, H, M = [int(x) for x in stdin.readline().rstrip().split()]
total_minute = H * 60 + M
tyosin = 6 * total_minute % 360
tanshin = 0.5 * total_minute % 360
... | from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools
INF = 10 ** 10
# A:時
# B:分
A, B, H, M = [int(x) for x in stdin.readline().rstrip().split()]
total_minute = H * 60 + M
tyosin = 6 * total_minute % 360
tanshin = 0.5 * total_minute % 360
... | [["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 130 |
import math
a, b, h, m = map(int, input().split())
h=h*60+m
ang=abs(h*0.5-m*6)
if ang > 180:
ang = 360-ang
if ang==180:
print(a+b)
elif(ang==0):
print(b-a)
else:
ans=(a**2)+(b**2)-(2*a*b*math.cos(math.radians(ang)))
print(math.sqrt(ans)) | import math
a, b, h, m = map(int, input().split())
h=h*60+m
ang=abs(h*0.5-m*6)
if ang > 180:
ang = 360-ang
if ang==180:
print(a+b)
elif(ang==0):
print(abs(b-a))
else:
ans=(a**2)+(b**2)-(2*a*b*math.cos(math.radians(ang)))
print(math.sqrt(ans)) | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 119 |
import math
A, B, H, M = map(int,input().split())
c = 0
timeA = H + (M/60)
argA = (1/12)*timeA
argB = (1/60)*M
sitaA = 360*argA
sitaB = 360*argB
if abs(sitaA-sitaB) == 180:
print(A+B)
exit()
if sitaA == sitaB:
print(abs(B-A))
exit()
elif sitaA > sitaB:
c = math.sqrt(A**2 + B**2 - abs((2*A*B*math.cos... | import math
A, B, H, M = map(int,input().split())
c = 0
timeA = H + (M/60)
argA = (1/12)*timeA
argB = (1/60)*M
sitaA = 360*argA
sitaB = 360*argB
if abs(sitaA-sitaB) == 180:
print(A+B)
exit()
if sitaA == sitaB:
print(abs(B-A))
exit()
elif sitaA > sitaB:
c = math.sqrt(A**2 + B**2 - (2*A*B*math.cos(ma... | [["-", 12, 652, 3, 4, 0, 657, 12, 652, 63, 22], ["-", 0, 657, 12, 652, 3, 4, 0, 23, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 24]] | 5 | 190 |
import math
if __name__ == "__main__":
# A(cm): 時針の長さ
# B(cm): 分針の長さ
# H(時): 時
# M(分): 分
A, B, H, M = map(int, input().split())
angle_h = 2*math.pi * (60*H + M) / (12 * 60)
angle_m = 2*math.pi * M / 60
diff = abs(angle_h - angle_m)
gamma = diff if diff < math.pi else diff - math.pi... | import math
if __name__ == "__main__":
# A(cm): 時針の長さ
# B(cm): 分針の長さ
# H(時): 時
# M(分): 分
A, B, H, M = map(int, input().split())
angle_h = 2*math.pi * (60*H + M) / (12 * 60)
angle_m = 2*math.pi * M / 60
diff = abs(angle_h - angle_m)
gamma = diff if diff < math.pi else 2*math.pi - di... | [["-", 0, 1, 0, 662, 12, 41, 0, 657, 31, 22], ["-", 0, 1, 0, 662, 12, 41, 0, 657, 17, 33], ["+", 0, 662, 12, 41, 0, 657, 31, 657, 31, 612], ["+", 0, 662, 12, 41, 0, 657, 31, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 41, 0, 657, 17, 33], ["+", 0, 1, 0, 662, 12, 41, 0, 657, 12, 22]] | 5 | 119 |
import math
a,b,h,m=input().split(' ')
w1=2*math.pi/720.0
w2=2*math.pi/60.0
t1 = w1*(int(h)*60+int(m))
t2 = w2*int(m)
t3 = abs(t1-t2)
l3 = math.sqrt(int(a)*int(a)+int(b)*int(b)-(abs)(2*int(a)*int(b)*math.cos(t3)))
print(l3)
| import math
a,b,h,m=input().split(' ')
w1=2*math.pi/720.0
w2=2*math.pi/60.0
t1 = w1*(int(h)*60+int(m))
t2 = w2*int(m)
t3 = abs(t1-t2)
l3 = math.sqrt(int(a)*int(a)+int(b)*int(b)-(2*int(a)*int(b)*math.cos(t3)))
print(l3)
| [["-", 3, 4, 0, 657, 12, 652, 63, 23, 0, 22], ["-", 3, 4, 0, 657, 12, 652, 63, 23, 0, 25], ["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 24]] | 5 | 125 |
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
using namespace std;
const double PI = 3.14159265358979323846;
int main() {
int a, b, h, m;
cin... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
using namespace std;
const double PI = 3.14159265358979323846;
int main() {
int a, b;
double h,... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 12, 16, 31, 23, 0, 16, 31, 16, 12, 13], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 158 |
import math
a,b,h,m=map(int,input().split())
q=h*30+m*0.5
w=m*6
cosa=math.cos(math.radians(q-w))
print((a**2+b**2-2*a*b*cos)**0.5) | import math
a,b,h,m=map(int,input().split())
q=h*30+m*0.5
w=m*6
cosa=math.cos(math.radians(q-w))
print((a**2+b**2-2*a*b*cosa)**0.5) | [["-", 0, 657, 31, 23, 0, 657, 12, 657, 12, 22], ["+", 0, 657, 31, 23, 0, 657, 12, 657, 12, 22]] | 5 | 73 |
import math
a,b,h,m=map(int,input().split())
ha=h * 30 + (30 * (m / 60))
ma=360 * (m / 60)
angle=max(ha,ma)-min(ha,ma)
if angle>=180:
angle-=180
if angle==90:
print(math.sqrt(a*a+b*b))
elif angle==0 or angle==180:
if angle==0:
print(abs(a-b))
else:
print(a+b)
else:
angle=angle/180*math.pi
#print(ha,... | import math
a,b,h,m=map(int,input().split())
ha=h * 30 + (30 * (m / 60))
ma=360 * (m / 60)
angle=max(ha,ma)-min(ha,ma)
if angle>=180:
angle = 360-angle
if angle==90:
print(math.sqrt(a*a+b*b))
elif angle==0 or angle==180:
if angle==0:
print(abs(a-b))
else:
print(a+b)
else:
angle=angle/180*math.pi
#pr... | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 163 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <iostream>
#include <math.h>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
double angle;
a... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#include <iostream>
#include <math.h>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double angle;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 143 |
import math
import decimal
a, b, h, m = map(int, input().split())
l = 6*m
s = 30*h + 0.5*m
r = abs(l-s)
print(r)
cos = math.cos(math.radians(r))
ans = ((a**2+b**2)-2*a*b*cos)**0.5
print('{:.20f}'.format(ans))
| import math
import decimal
a, b, h, m = map(int, input().split())
l = 6*m
s = 30*h + 0.5*m
r = abs(l-s)
cos = math.cos(math.radians(r))
ans = ((a**2+b**2)-2*a*b*cos)**0.5
print('{:.21f}\n'.format(ans)) | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 0, 652, 63, 319, 500, 557, 0, 6, 0, 44]] | 5 | 97 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
// using ll = long long;
// using P = pair<int, int>;
const double pi = 3.141592653589793;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double thetaA = (h * 60.0 + m) / 2.0; // a*60.0*360.0/720.0;
double ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
// using ll = long long;
// using P = pair<int, int>;
const double pi = 3.141592653589793;
int main() {
double a, b, h, m;
cin >> a >> b >> h >> m;
double thetaA = (h * 60.0 + m) / 2.0; // a*60.0*360.0/720.0;
double ... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 150 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import math as mt
def main():
A, B, H, M = map(int, input().split())
theta1 = 30*H + M/2
theta2 = 60*M
xx = A**2 + B**2 - 2*A*B*mt.cos(mt.radians(theta2-theta1))
print(mt.sqrt(xx))
if __name__ == '__main__':
main() | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import math as mt
def main():
A, B, H, M = map(int, input().split())
theta1 = 30*H + M/2
theta2 = 6*M
xx = A**2 + B**2 - 2*A*B*mt.cos(mt.radians(theta2-theta1))
print(mt.sqrt(xx))
if __name__ == '__main__':
main() | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 612]] | 5 | 93 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
int A, B, H, M;
cin >> A >> B >> H >> M;
long double pi = 3.141592653589793;
double angle = 0;
double angleH = 30 * H + M / ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
double A, B, H, M;
cin >> A >> B >> H >> M;
long double pi = 3.141592653589793;
double angle = 0;
double angleH = 30 * H + M... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 160 |
import math
a,b,h,m=map(int,input().split())
h_=h*30
m_=m*6
p=abs(h_-m_)
if p>=180:
p=360-p
ans=a**2+b**2-2*a*b*math.cos(math.radians(p))
print((ans)**0.5) | import math
a,b,h,m=map(int,input().split())
h_=h*30+m*30/60
m_=m*6
p=abs(h_-m_)
if p>=180:
p=360-p
ans=a**2+b**2-2*a*b*math.cos(math.radians(p))
print((ans)**0.5) | [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 31, 22], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 17, 48], ["+", 0, 662, 12, 657, 12, 657, 31, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]] | 5 | 85 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
// double ra = h*30 + (m/60.)*30;
double ra = h * ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int a, b, h, m;
cin >> a >> b >> h >> m;
// double ra = h*30 + (m/60.)*30;
double ra = h * ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13]] | 1 | 151 |
import math
A, B, H, M = map(int, input().split())
sA = (60*H+M)/360*3.141592
sB = M/30*3.141592
Ax = A*math.cos(sA)
Bx = B*math.cos(sB)
Ay = A*math.sin(sA)
By = B*math.sin(sB)
res = math.sqrt((Ax-Bx)**2+(Ay-By)**2)
print(res) | import math
A, B, H, M = map(int, input().split())
sA = (60*H+M)/360*math.pi
sB = M/30*math.pi
Ax = A*math.cos(sA)
Bx = B*math.cos(sB)
Ay = A*math.sin(sA)
By = B*math.sin(sB)
res = math.sqrt((Ax-Bx)**2+(Ay-By)**2)
print(res) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 531], ["+", 0, 1, 0, 662, 12, 657, 12, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 319, 0, 131], ["+", 0, 1, 0, 662, 12, 657, 12, 319, 319, 22]] | 5 | 108 |
import math
A, B, H, M = map(int, input().split())
doubledt = 60*H - 11*M
t = 0
if(doubledt > 360):
t = math.pi * (doubledt-360)/360
else:
t = math.pi * doubledt/360
tlen = math.sqrt(A*A + B*B - 2*A*B*math.cos(t))
print('{:.20f}'.format(tlen))
| import math
A, B, H, M = map(int, input().split())
doubledt = abs(60*H - 11*M)
t = 0
if(doubledt > 360):
t = math.pi * (720-doubledt)/360
else:
t = math.pi * doubledt/360
tlen = math.sqrt(A*A + B*B - 2*A*B*math.cos(t))
print('{:.20f}'.format(tlen)) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 12, 657, 31, 657, 12, 23, 0, 657, 31, 22], ["+", 12, 657, 31, 657, 12, 23, 0, 657, 31, 612], ["-", 12, 657, 31, 657, 12, 23, 0, 657, 12, 612], ["+", 12, 657, 31, 657, 12, 23, 0, 657... | 5 | 103 |
import math
A,B,h,m=map(int,input().split())
time=60*h+m
a=(0.5*time)%360
b=(6*time)%360
x=abs(a-b)
if x==0 or x==360:
c=0
elif x==180:
c=A+B
else:
c=math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(x)))
print(c) | import math
A,B,h,m=map(int,input().split())
time=60*h+m
a=(0.5*time)%360
b=(6*time)%360
x=abs(a-b)
if x==0 or x==360:
c=abs(A-B)
elif x==180:
c=A+B
else:
c=math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(x)))
print(c) | [["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 115 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using ll = long long;
using ld = long double;
using namespace std;
con... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using ll = long long;
using ld = long double;
using namespace std;
con... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 221 |
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes c... | //#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes c... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 255 |
import math
chou_len, tan_len, nan_ji, nan_pun = map(int, input().split())
nan_ji_kaku = 30*nan_ji + nan_pun*30/60
nan_pun_kaku = 6*nan_pun
kaku = abs(nan_ji_kaku-nan_pun_kaku)
if kaku > 180:
kaku = kaku - 180
if(kaku == 0):
print(abs(chou_len-tan_len))
elif(kaku == 180):
print(chou_len+tan_len)
else:
ka... | import math
chou_len, tan_len, nan_ji, nan_pun = map(int, input().split())
nan_ji_kaku = 30*nan_ji + nan_pun*30/60
nan_pun_kaku = 6*nan_pun
kaku = abs(nan_ji_kaku-nan_pun_kaku)
if kaku > 180:
kaku = 360-kaku
if(kaku == 0):
print(abs(chou_len-tan_len))
elif(kaku == 180):
print(chou_len+tan_len)
else:
kai = m... | [["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 124 |
import numpy as np
from numpy import linalg as LA
import math
a,b,h,m=input().split()
a=float(a)
b=float(b)
h=float(h)
m=float(m)
hh=-h/12*360+90
mm=-m/60*360+90
hx=math.cos(math.radians(hh))*a
hy=math.sin(math.radians(hh))*a
mx=math.cos(math.radians(mm))*b
my=math.sin(math.radians(mm))*b
x=np.array([hx-mx,hy-my])
p... | import numpy as np
from numpy import linalg as LA
import math
a,b,h,m=input().split()
a=float(a)
b=float(b)
h=float(h)
m=float(m)
hh=-(h/12+m/720)*360+90
mm=-m/60*360+90
hx=math.cos(math.radians(hh))*a
hy=math.sin(math.radians(hh))*a
mx=math.cos(math.radians(mm))*b
my=math.sin(math.radians(mm))*b
x=np.array([hx-mx,h... | [["+", 12, 657, 31, 657, 31, 664, 28, 23, 0, 24], ["+", 31, 657, 31, 664, 28, 23, 0, 657, 17, 72], ["+", 31, 664, 28, 23, 0, 657, 12, 657, 31, 22], ["+", 31, 664, 28, 23, 0, 657, 12, 657, 17, 85], ["+", 31, 664, 28, 23, 0, 657, 12, 657, 12, 612], ["+", 12, 657, 31, 657, 31, 664, 28, 23, 0, 25]] | 5 | 156 |
# -*- coding: utf-8 -*-
import math
a, b, h, m = map(int, input().split())
h = 30*h
m = 6*m
delta = abs((h-m)*math.pi/180)
print(math.sqrt(a**2+b**2-2*a*b*math.cos(delta)))
| # -*- coding: utf-8 -*-
import math
a, b, h, m = map(int, input().split())
h = 30*h
m = 6*m
h += m/12
delta = abs((h-m)*math.pi/180)
print(math.sqrt(a**2+b**2-2*a*b*math.cos(delta))) | [["+", 36, 36, 0, 656, 0, 1, 0, 677, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 107], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 12, 612]] | 5 | 77 |
import math
abhm = input('')
a=int(abhm.split(' ')[0])
b=int(abhm.split(' ')[1])
h=int(abhm.split(' ')[2])
m=int(abhm.split(' ')[3])
hx=360/12*h + 360/(12*60)*m
mx=360/60*m
angle = abs(hx-mx)
if angle > 180:
angle = abs(angle-180)
c2 = pow(a,2) + pow(b,2) - 2*a*b*math.cos(math.radians(angle))
#print("a:{} b:{} c... | import math
abhm = input('')
a=int(abhm.split(' ')[0])
b=int(abhm.split(' ')[1])
h=int(abhm.split(' ')[2])
m=int(abhm.split(' ')[3])
hx=360/12*h + 360/(12*60)*m
mx=360/60*m
#print("hx:{}/{} mx:{}/{}".format(h,hx,m,mx))
angle = abs(hx-mx)
if angle > 180:
angle = abs(angle-360)
c2 = pow(a,2) + pow(b,2) - 2*a*b*ma... | [["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 164 |
import math
in1 = input().split()
A = float(in1[0])
B = float(in1[1])
H = float(in1[2])
M = float(in1[3])
aH = 0.5 * (H * 60 + M)
aM = 6*M
ra = abs(aH-aM)
ra1 = min(360 - ra, ra)
C2 = ((A*A)+(B*B))- (2*(A*B))*(math.cos(math.radians(ra1)))
print(math.sqrt(C2))
print(ra1)
| import math
in1 = input().split()
A = float(in1[0])
B = float(in1[1])
H = float(in1[2])
M = float(in1[3])
aH = 0.5 * (H * 60 + M)
aM = 6*M
ra = abs(aH-aM)
ra1 = min(360 - ra, ra)
C2 = ((A*A)+(B*B))- (2*(A*B))*(math.cos(math.radians(ra1)))
print(math.sqrt(C2))
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 133 |
#include <math.h>
#include <stdio.h>
int main(void) {
int a, b, h, m;
int minutes;
double kakudo_m, kakudo_h, kakudo, len;
scanf("%d%d%d%d", &a, &b, &h, &m);
minutes = h * 60 + m;
kakudo_m = (minutes % 360) * (double)6;
kakudo_h = (double)(minutes * 360) / (12 * 60);
kakudo = (double)(fabs(kakudo_h - ... | #include <math.h>
#include <stdio.h>
int main(void) {
int a, b, h, m;
int minutes;
double kakudo_m, kakudo_h, kakudo, len;
scanf("%d%d%d%d", &a, &b, &h, &m);
minutes = (double)h * 60 + m;
kakudo_m = (minutes % 360) * (double)6;
kakudo_h = (double)(minutes * 360) / (12 * 60);
kakudo = (double)(fabs(kak... | [["+", 0, 11, 12, 16, 31, 16, 31, 74, 0, 24], ["+", 12, 16, 31, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 11, 12, 16, 31, 16, 31, 74, 0, 25], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 149 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long A, B, H, M;
double temp = 0, result = 0, kakudo = 0, radians = 0, tankakudo = 0,
chokakudo = 0;
const double PI = acos(-1);
cin >> A >> B >> H >> M;
tankakudo = 30 * H + (30 * M / 60);
chokakudo = 6 * M;
kakudo = abs(tankaku... | #include <bits/stdc++.h>
using namespace std;
int main() {
double A, B, H, M;
double temp = 0, result = 0, kakudo = 0, radians = 0, tankakudo = 0,
chokakudo = 0;
const double PI = acos(-1);
cin >> A >> B >> H >> M;
tankakudo = 30 * H + (30 * M / 60);
chokakudo = 6 * M;
kakudo = abs(tankakudo ... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]] | 1 | 200 |
a, b, h, m = map(int, input().split())
import math
hour_v = 2 * math.pi / 12
min_v = 2 * math.pi / 60
hour_ang = (h + (m/60)) * hour_v
min_ang = m * min_v
if hour_ang < min_ang:
theta = min_ang - hour_ang
else:
theta = hour_ang - min_ang
print(theta)
ans = math.sqrt((a ** 2) + (b ** 2) - 2 * a * b * math.... | a, b, h, m = map(int, input().split())
import math
hour_v = 2 * math.pi / 12
min_v = 2 * math.pi / 60
hour_ang = (h + (m/60)) * hour_v
min_ang = m * min_v
if hour_ang < min_ang:
theta = min_ang - hour_ang
else:
theta = hour_ang - min_ang
ans = math.sqrt((a ** 2) + (b ** 2) - 2 * a * b * math.cos(theta))
p... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 114 |
import math
a, b, h, m = map(int, input().split())
bb = math.pi * m / 30.
aa = math.pi * (h+m/60.) / 6.
print(aa, bb)
print(math.sqrt((b*math.sin(bb)-a*math.sin(aa)) ** 2 + (b*math.cos(bb)-a*math.cos(aa))**2))
| import math
a, b, h, m = map(int, input().split())
bb = math.pi * m / 30.
aa = math.pi * (h+m/60.) / 6.
print(math.sqrt((b*math.sin(bb)-a*math.sin(aa))
** 2 + (b*math.cos(bb)-a*math.cos(aa))**2))
| [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 103 |
#include <cmath>
#include <cstdio>
#define PI 3.14159265358979323846
typedef double db;
int main(void) {
db a, b, h, m;
scanf("%lf %lf %lf %lf", &a, &b, &h, &m);
db min = m * 6.0;
db hour = (h * 60.0 + m) * 0.5;
db dis = abs(min - hour);
db tmp = (db)a * a + (db)b * b - (db)2 * a * b * cos(dis * PI /... | #include <cmath>
#include <cstdio>
#define PI 3.14159265358979323846
typedef double db;
int main(void) {
db a, b, h, m;
scanf("%lf %lf %lf %lf", &a, &b, &h, &m);
db min = m * 6.0;
db hour = (h * 60.0 + m) * 0.5;
db dis = min - hour;
db tmp = (db)a * a + (db)b * b - (db)2 * a * b * cos(dis * PI / 180.... | [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 126 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
double A, B, H, M, Wh, Ws, W, ans, PI = 3.14159265;
cin >> A >> B >> H >> M;
Wh = (PI / 360) * (H * 60 + M);
Ws = (PI / 30) * M;
W = abs(Wh - Ws);
if (W > PI) {... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
double A, B, H, M, Wh, Ws, W, ans, PI = 3.14159265358979323846;
cin >> A >> B >> H >> M;
Wh = (PI / 360) * (H * 60 + M);
Ws = (PI / 30) * M;
W = abs(Wh - Ws);
i... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 145 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (n); ++i)
#define REP(i, d, n) for (long long i = (d); i < (n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
int main() { //言語変えろ言語変えろ言語変えろ言語変えろ言語変えろ
int a, b, h, m;
cin >> a >> b >> h >> m;
long double pai ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (n); ++i)
#define REP(i, d, n) for (long long i = (d); i < (n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
int main() { //言語変えろ言語変えろ言語変えろ言語変えろ言語変えろ
int a, b, h, m;
cin >> a >> b >> h >> m;
long double pai ... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13]] | 1 | 184 |
#include <bits/stdc++.h>
int c() {
int a, b, h, m;
std::cin >> a >> b >> h >> m;
int time = 60 * h + m;
long double degA = 0.5 * time;
long double degB = 6 * m;
int tempDeg = std::abs(degA - degB);
const double PI = 3.14159265358979323846;
if (180 < tempDeg) {
tempDeg = 360 - tempDeg;
}
long d... | #include <bits/stdc++.h>
int c() {
int a, b, h, m;
std::cin >> a >> b >> h >> m;
int time = 60 * h + m;
long double degA = 0.5 * time;
long double degB = 6 * m;
long double tempDeg = std::abs(degA - degB);
const double PI = 3.14159265358979323846;
if (180 < tempDeg) {
tempDeg = 360 - tempDeg;
}
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40]] | 1 | 210 |
a,b,h,m = gets.split(" ").map(&:to_f)
pi = Math::PI
W = ((h/12)*(2*pi)-(m/60)*(2*pi)).abs
ans = Math.sqrt(a*a + b*b - 2*a*b*Math.cos(W))
puts ans | a,b,h,m = gets.split(" ").map(&:to_f)
pi = Math::PI
W = ((h/12+m/720)*(2*pi)-(m/60)*(2*pi)).abs
ans = Math.sqrt(a*a + b*b - 2*a*b*Math.cos(W))
puts ans | [["+", 0, 738, 31, 738, 31, 739, 0, 738, 17, 72], ["+", 31, 738, 31, 739, 0, 738, 12, 738, 31, 22], ["+", 31, 738, 31, 739, 0, 738, 12, 738, 17, 85], ["+", 31, 738, 31, 739, 0, 738, 12, 738, 12, 612]] | 4 | 85 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
double A = scan.nextDouble();
double B = scan.nextDouble();
double H = scan.nextDouble();
double M = scan.nextDouble();
double x = 0d;
double theta = 0d;
t... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
double A = scan.nextDouble();
double B = scan.nextDouble();
double H = scan.nextDouble();
double M = scan.nextDouble();
double x = 0d;
double theta = 0d;
t... | [["-", 8, 196, 0, 57, 64, 1, 0, 11, 17, 110], ["-", 8, 196, 0, 57, 64, 1, 0, 11, 12, 515], ["+", 8, 196, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 31, 515], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 22]] | 3 | 169 |
import math
a, b, h, m = map(int, input().split())
hour = 0.5 * (h * 60 + m)
minute = 6 * m
angle = abs(hour - minute)
angle = min(360 - angle, angle)
print(angle)
ans = a**2 + b**2 - 2*a*b*math.cos(math.radians(angle))
ans = ans**0.5
print(ans)
| import math
a, b, h, m = map(int, input().split())
hour = 0.5 * (h * 60 + m)
minute = 6 * m
angle = abs(hour - minute)
angle = min(360 - angle, angle)
ans = a**2 + b**2 - 2*a*b*math.cos(math.radians(angle))
ans = ans**0.5
print(ans)
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 96 |
import math
a,b,h,m=map(int,input().split())
hkakudo=h*30+(m//2)
mkakudo=m*6
if hkakudo == 0:
hkakudo = 360
if mkakudo == 0:
mkakudo = 360
kakudo = abs(hkakudo-mkakudo)
print(math.sqrt(a**2+b**2-(2*a*b*math.cos(math.radians(kakudo))))) | import math
a,b,h,m=map(int,input().split())
hkakudo=h*30+(m/2)
mkakudo=m*6
if hkakudo == 0:
hkakudo = 360
if mkakudo == 0:
mkakudo = 360
kakudo = abs(hkakudo-mkakudo)
print(math.sqrt(a**2+b**2-(2*a*b*math.cos(math.radians(kakudo))))) | [["-", 0, 662, 12, 657, 12, 23, 0, 657, 17, 676], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 17, 85]] | 5 | 97 |
function Main(input) {
input = input.replace(/\n/g, ' ');
input = input.split(" ");
var A = input[0];
var B = input[1];
var C = input[2];
var D = input[3];
var ans = 0;
var Sado = Math.abs(C * 30 + D / 2 - D * 6);
if (Sado > 180) {
Sado = Sado - 180;
}
var p = A * A + B * B;
var q = 2 * A * ... | function Main(input) {
input = input.replace(/\n/g, ' ');
input = input.split(" ");
var A = input[0];
var B = input[1];
var C = input[2];
var D = input[3];
var ans = 0;
var Sado = Math.abs(C * 30 + D / 2 - D * 6);
if (Sado > 180) {
Sado = 360 - Sado;
}
var p = A * A + B * B;
var q = 2 * A * ... | [["-", 64, 556, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 556, 0, 1, 0, 11, 12, 16, 31, 555], ["-", 64, 556, 0, 1, 0, 11, 12, 16, 12, 555], ["+", 64, 556, 0, 1, 0, 11, 12, 16, 12, 22]] | 2 | 179 |
#include <math.h>
#include <stdio.h>
#define abs(x) (x > 0 ? x : -x)
int main() {
double A, B, H, M;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
double thetaH, thetaM, ans2;
thetaH = 2 * M_PI / 12 * (H + M / 60);
thetaM = 2 * M_PI / 60 * M;
ans2 = A * A + B * B - 2 * A * B * cos(abs(thetaH - thetaM));
pri... | #include <math.h>
#include <stdio.h>
#define abs(x) (x > 0 ? x : -x)
int main() {
double A, B, H, M;
scanf("%lf %lf %lf %lf", &A, &B, &H, &M);
double thetaH, thetaM, ans2;
thetaH = 2 * M_PI / 12 * (H + M / 60);
thetaM = 2 * M_PI / 60 * M;
ans2 = A * A + B * B - 2 * A * B * cos(thetaH - thetaM);
printf("... | [["-", 12, 16, 12, 2, 3, 4, 0, 2, 63, 22], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 115 |
import math
A, B, H, M = map(int, input().split())
Mkaku = 6 * M
Hkaku = (H * 60 + M) / 2
r1 = Hkaku * math.pi / 180
r2 = Mkaku * math.pi / 180
v1x = A * math.cos(r1)
v1y = A * math.sin(r1)
v2x = B * math.cos(r2)
v2y = B * math.sin(r2)
ans = ((v1x - v2x) ** 2 + (v1y - v2y) ** 2) ** 1/2
print(ans) | import math
A, B, H, M = map(int, input().split())
Mkaku = 6 * M
Hkaku = (H * 60 + M) / 2
r1 = Hkaku * math.pi / 180
r2 = Mkaku * math.pi / 180
v1x = A * math.cos(r1)
v1y = A * math.sin(r1)
v2x = B * math.cos(r2)
v2y = B * math.sin(r2)
ans = ((v1x - v2x) ** 2 + (v1y - v2y) ** 2) ** (1 / 2)
print(ans) | [["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]] | 5 | 123 |
import sys
import math
#sys.exit()
#sorted( ,reverse=True)
#N = int(input())
A,B,H,M = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
cA = 360*H//12 +30 * M//60
cB = 360*M//60
cC = abs(cA -cB)
if cC > 180:
cC = 360 - cC
#cnt = 0
#cnt += 1
coscC = math.cos(math.... | import sys
import math
#sys.exit()
#sorted( ,reverse=True)
#N = int(input())
A,B,H,M = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
cA = 360*H/12 +30 * M/60
cB = 360*M/60
cC = abs(cA -cB)
if cC > 180:
cC = 360 - cC
#cnt = 0
#cnt += 1
coscC = math.cos(math.radi... | [["-", 0, 1, 0, 662, 12, 657, 31, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 85], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 114 |
<?php
fscanf(STDIN,"%d%d%d%d", $a,$b,$h,$m);
$arg1 = 6*$m;
$arg2 = (30*$h)+(0.5*$m);
//echo $arg1."\n".$arg2."\n";
if($arg1 != $arg2){
$arg = abs($arg1 - $arg2);
if($arg > 180){
$arg -= 180;
}else if($arg == 180){
echo $a+$b;
exit;
}
$dis2 = ($a*$a)+($b*$b)-(2*$a*$b*c... | <?php
fscanf(STDIN,"%d%d%d%d", $a,$b,$h,$m);
$arg1 = 6*$m;
$arg2 = (30*$h)+(0.5*$m);
//echo $arg1."\n".$arg2."\n";
if($arg1 != $arg2){
$arg = abs($arg1 - $arg2);
//echo $arg."\n";
if($arg > 180){
$arg = 360 - $arg;;
//echo $arg."\n";
}else if($arg == 180){
echo $a+$b;
... | [["-", 0, 57, 8, 9, 0, 1, 0, 564, 17, 110], ["-", 0, 57, 8, 9, 0, 1, 0, 564, 12, 612], ["+", 0, 57, 8, 9, 0, 1, 0, 11, 0, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 612], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 12, 606, 0, 607], ["+", 0, 1, 0, 11, 12, 16, 12, 606, 0, 141], ["+", 8, 9, 0, 57,... | 6 | 161 |
#C
from math import cos,pi,pow
A,B,H,M=map(float,input().split())
A_d=pi*(H*60+M)/360
B_d=pi*M/30
D=abs(A_d-B_d)%pi
result=pow(A**2+B**2-2*A*B*cos(D),0.5)
print(result) | #C
from math import cos,pi,pow
A,B,H,M=map(float,input().split())
A_d=pi*(H*60+M)/360
B_d=pi*M/30
D=abs(A_d-B_d)
result=pow(A**2+B**2-2*A*B*cos(D),0.5)
print(result) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 88 |
#include <bits/stdc++.h>
#define ll long long
#define fastIO \
cout << fixed << setprecision(12), ios::sync_with_stdio(false), \
cin.tie(nullptr), cout.tie(nullptr)
using namespace std;
const double PI = acos(-1);
int main() {
fast... | #include <bits/stdc++.h>
#define ll long long
#define fastIO \
cout << fixed << setprecision(12), ios::sync_with_stdio(false), \
cin.tie(nullptr), cout.tie(nullptr)
using namespace std;
const double PI = acos(-1);
int main() {
fast... | [["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22], ["-", 0, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 165 |
import sys
import math
A, B, H, M = map(int, input().split())
cA = 360*H//12 + 30 * M//60
cB = 360*M//60
cC = abs(cA - cB)
if cC > 180:
cC = 360 - cC
coscC = math.cos(math.radians(cC))
C = A**2 + B**2 - 2 * A*B*coscC
print(C**(1/2))
| import sys
import math
A, B, H, M = map(int, input().split())
cA = 360*H/12 + 30 * M/60
cB = 360*M/60
cC = abs(cA - cB)
if cC > 180:
cC = 360 - cC
coscC = math.cos(math.radians(cC))
C = A**2 + B**2 - 2 * A*B*coscC
print(C**(1/2))
| [["-", 0, 1, 0, 662, 12, 657, 31, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 85], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 102 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(long long A, long long B, long long H, long long M) {
long double thetaM = M * 6;
long double thetaH = 1.0L * H * 30 + M / 2;
// cout<<thetaM<<" "<<thetaH<<endl;
thetaM /= 180.0;
thetaM *= 3.141592653589793238462643383279;
theta... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(long long A, long long B, long long H, long long M) {
long double thetaM = M * 6;
long double thetaH = 1.0L * H * 30 + M / 2.0;
// cout<<thetaM<<" "<<thetaH<<endl;
thetaM /= 180.0;
thetaM *= 3.141592653589793238462643383279;
the... | [["-", 0, 43, 49, 50, 51, 16, 12, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 12, 13]] | 1 | 200 |
#include <bits/stdc++.h>
const double PI = 3.14159265358979323846;
using namespace std;
int main() {
double A, B, H, M;
cin >> A >> B >> H >> M;
double rad_dif, X;
rad_dif = fabs(((H * 60 + M) / 720) - (M / 60)) * 2 * PI;
X = sqrt(pow(A, 2) + pow(B, 2) - 2 * A * B * fabs(cos(rad_dif)));
cout << setprecisio... | #include <bits/stdc++.h>
const double PI = 3.14159265358979323846;
using namespace std;
int main() {
double A, B, H, M;
cin >> A >> B >> H >> M;
double rad_dif, X;
rad_dif = fabs(((H * 60 + M) / 720) - (M / 60)) * 2 * PI;
X = sqrt(pow(A, 2) + pow(B, 2) - 2 * A * B * cos(rad_dif));
cout << setprecision(20) ... | [["-", 3, 4, 0, 16, 12, 16, 12, 2, 63, 22], ["-", 0, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 113 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.