Submission #268177


Source Code Expand

rng_nne	= 113..337
rng_ne	= 338..562
rng_ene	= 563..787
rng_e	= 788..1012
rng_ese	= 1013..1237
rng_se	= 1238..1462
rng_sse = 1463..1687
rng_s	= 1688..1912
rng_ssw	= 1913..2137
rng_sw	= 2138..2362
rng_wsw	= 2363..2587
rng_w	= 2588..2812
rng_wnw	= 2813..3037
rng_nw	= 3038..3262
rng_nnw	= 3263..3487

InputDT = gets;
DegDis = InputDT.split;

deg = (DegDis[0].to_i);
dis = ((DegDis[1].to_f)/60.00).round(1);

case dis
	when 	0.0..0.2	then	w_pow = 0;
	when	0.3..1.5	then	w_pow = 1;
	when	1.6..3.3	then	w_pow = 2;
	when	3.4..5.4	then	w_pow = 3;
	when	5.5..7.9	then	w_pow = 4;
	when	8.0..10.7	then	w_pow = 5;
	when	10.8..13.8	then	w_pow = 6;
	when	13.9..17.1	then	w_pow = 7;
	when	17.2..20.7	then	w_pow = 8;
	when	20.8..24.4	then	w_pow = 9;
	when	24.5..28.4	then	w_pow = 10;
	when	28.5..32.6	then	w_pow = 11;
	else						w_pow = 12;
end


if( w_pow == 0 )then
	print("C ");
else
case deg
	when rng_nne	then	print("NNE ")
	when rng_ne		then	print("NE ")
	when rng_ene	then	print("NEN ")
	when rng_e		then	print("E ")
	when rng_ese	then	print("ESE ")
	when rng_se		then	print("SE ")
	when rng_sse	then	print("SSE ")
	when rng_s		then	print("S ")
	when rng_ssw	then	print("SSW ")
	when rng_sw		then	print("SW ")
	when rng_wsw	then	print("WSW ")
	when rng_w		then	print("W ")
	when rng_wnw	then	print("WNW ")
	when rng_nw		then	print("NW ")
	when rng_nnw	then	print("NNW ")
	else					print("N ")
end
end

puts(w_pow)

Submission Info

Submission Time
Task A - 積雪深差
User tkudo_atcoder
Language Ruby (1.9.3)
Score 0
Code Size 1473 Byte
Status WA
Exec Time 63 ms
Memory 4400 KB

Judge Result

Set Name all
Score / Max Score 0 / 100
Status
WA × 20
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt
Case Name Status Exec Time Memory
00_sample_01.txt WA 60 ms 4208 KB
00_sample_02.txt WA 58 ms 4332 KB
00_sample_03.txt WA 60 ms 4400 KB
test_01.txt WA 57 ms 4208 KB
test_02.txt WA 61 ms 4288 KB
test_03.txt WA 58 ms 4204 KB
test_04.txt WA 57 ms 4336 KB
test_05.txt WA 56 ms 4332 KB
test_06.txt WA 56 ms 4336 KB
test_07.txt WA 58 ms 4312 KB
test_08.txt WA 58 ms 4312 KB
test_09.txt WA 56 ms 4208 KB
test_10.txt WA 57 ms 4208 KB
test_11.txt WA 56 ms 4332 KB
test_12.txt WA 57 ms 4208 KB
test_13.txt WA 57 ms 4332 KB
test_14.txt WA 56 ms 4212 KB
test_15.txt WA 57 ms 4316 KB
test_16.txt WA 63 ms 4268 KB
test_17.txt WA 57 ms 4332 KB