Submission #371101


Source Code Expand

s = gets.chomp.split(" ")

flg = true
while flg
	flg = false
	(0...(s.size - 2)).each{ |i|
		if s[i] == "not" && s[i+1] == "not" && s[i+2] != "not"
			s.delete_at i
			s.delete_at i
			flg = true
			break
		end
	}
end

puts s.join(" ")

Submission Info

Submission Time
Task A - 二重否定除去法則
User semiexp
Language Ruby (1.9.3p550)
Score 100
Code Size 250 Byte
Status AC
Exec Time 347 ms
Memory 4168 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 19
Set Name Test Cases
All scrambled_00.txt, scrambled_01.txt, scrambled_02.txt, scrambled_03.txt, scrambled_04.txt, scrambled_05.txt, scrambled_06.txt, scrambled_07.txt, scrambled_08.txt, scrambled_09.txt, scrambled_10.txt, scrambled_11.txt, scrambled_12.txt, scrambled_13.txt, scrambled_14.txt, scrambled_15.txt, scrambled_16.txt, scrambled_17.txt, scrambled_18.txt
Case Name Status Exec Time Memory
scrambled_00.txt AC 51 ms 4072 KB
scrambled_01.txt AC 50 ms 4068 KB
scrambled_02.txt AC 49 ms 4068 KB
scrambled_03.txt AC 49 ms 4068 KB
scrambled_04.txt AC 51 ms 4068 KB
scrambled_05.txt AC 347 ms 4068 KB
scrambled_06.txt AC 52 ms 4068 KB
scrambled_07.txt AC 344 ms 4068 KB
scrambled_08.txt AC 325 ms 4068 KB
scrambled_09.txt AC 51 ms 4064 KB
scrambled_10.txt AC 50 ms 4060 KB
scrambled_11.txt AC 49 ms 4084 KB
scrambled_12.txt AC 50 ms 4064 KB
scrambled_13.txt AC 50 ms 4068 KB
scrambled_14.txt AC 49 ms 4168 KB
scrambled_15.txt AC 52 ms 4064 KB
scrambled_16.txt AC 53 ms 4108 KB
scrambled_17.txt AC 51 ms 4064 KB
scrambled_18.txt AC 53 ms 4100 KB