AtCoder Regular Contest 002

Submission #381485

Source codeソースコード

Y, M, D = map(int, input().split("/"))
month = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
while not (Y % M == 0 and (Y // M) % D == 0):
	D += 1
	if D > month[M]:
		if M == 2 and D == 29 and ((Y % 400 == 0 or Y % 100 != 0) and Y % 4 == 0):
			continue
		if M == 12:
			Y += 1
			M = 1
		else:
			M += 1
		D = 1
print("%04d/%02d/%02d" % (Y, M, D))

Submission

Task問題 B - 割り切れる日付
User nameユーザ名 yumechi0525
Created time投稿日時
Language言語 Python3 (3.2.3)
Status状態 AC
Score得点 100
Source lengthソースコード長 367 Byte
File nameファイル名
Exec time実行時間 152 ms
Memory usageメモリ使用量 8532 KB

Test case

Set

Set name Score得点 / Max score Cases
All 100 / 100 00_retmax.txt,00_retmin.txt,00_sample_00.txt,00_sample_01.txt,00_sample_02.txt,01_rnd_00.txt,01_rnd_01.txt,01_rnd_02.txt,01_rnd_03.txt,01_rnd_04.txt,01_rnd_05.txt,01_rnd_06.txt,01_rnd_07.txt,01_rnd_08.txt,01_rnd_09.txt,01_rnd_10.txt,01_rnd_11.txt,01_rnd_12.txt,01_rnd_13.txt,01_rnd_14.txt,01_rnd_15.txt,01_rnd_16.txt,01_rnd_17.txt,01_rnd_18.txt,01_rnd_19.txt,02_last_01_0_0.txt,02_last_01_0_1.txt,02_last_01_1_0.txt,02_last_01_1_1.txt,02_last_01_2_0.txt,02_last_01_2_1.txt,02_last_01_3_0.txt,02_last_01_3_1.txt,02_last_02_0_0.txt,02_last_02_0_1.txt,02_last_02_1_0.txt,02_last_02_1_1.txt,02_last_02_2_0.txt,02_last_02_2_1.txt,02_last_02_3_0.txt,02_last_02_3_1.txt,02_last_03_0_0.txt,02_last_03_0_1.txt,02_last_03_1_0.txt,02_last_03_1_1.txt,02_last_03_2_0.txt,02_last_03_2_1.txt,02_last_03_3_0.txt,02_last_03_3_1.txt,02_last_04_0_0.txt,02_last_04_0_1.txt,02_last_04_1_0.txt,02_last_04_1_1.txt,02_last_04_2_0.txt,02_last_04_2_1.txt,02_last_04_3_0.txt,02_last_04_3_1.txt,02_last_05_0_0.txt,02_last_05_0_1.txt,02_last_05_1_0.txt,02_last_05_1_1.txt,02_last_05_2_0.txt,02_last_05_2_1.txt,02_last_05_3_0.txt,02_last_05_3_1.txt,02_last_06_0_0.txt,02_last_06_0_1.txt,02_last_06_1_0.txt,02_last_06_1_1.txt,02_last_06_2_0.txt,02_last_06_2_1.txt,02_last_06_3_0.txt,02_last_06_3_1.txt,02_last_07_0_0.txt,02_last_07_0_1.txt,02_last_07_1_0.txt,02_last_07_1_1.txt,02_last_07_2_0.txt,02_last_07_2_1.txt,02_last_07_3_0.txt,02_last_07_3_1.txt,02_last_08_0_0.txt,02_last_08_0_1.txt,02_last_08_1_0.txt,02_last_08_1_1.txt,02_last_08_2_0.txt,02_last_08_2_1.txt,02_last_08_3_0.txt,02_last_08_3_1.txt,02_last_09_0_0.txt,02_last_09_0_1.txt,02_last_09_1_0.txt,02_last_09_1_1.txt,02_last_09_2_0.txt,02_last_09_2_1.txt,02_last_09_3_0.txt,02_last_09_3_1.txt,02_last_10_0_0.txt,02_last_10_0_1.txt,02_last_10_1_0.txt,02_last_10_1_1.txt,02_last_10_2_0.txt,02_last_10_2_1.txt,02_last_10_3_0.txt,02_last_10_3_1.txt,02_last_11_0_0.txt,02_last_11_0_1.txt,02_last_11_1_0.txt,02_last_11_1_1.txt,02_last_11_2_0.txt,02_last_11_2_1.txt,02_last_11_3_0.txt,02_last_11_3_1.txt,02_last_12_0_0.txt,02_last_12_0_1.txt,02_last_12_1_0.txt,02_last_12_1_1.txt,02_last_12_2_0.txt,02_last_12_2_1.txt,02_last_12_3_0.txt,02_last_12_3_1.txt,03_special_01.txt,03_special_02.txt,03_special_03.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00_retmax.txt AC 128 ms 8368 KB
00_retmin.txt AC 129 ms 8368 KB
00_sample_00.txt AC 129 ms 8368 KB
00_sample_01.txt AC 127 ms 8368 KB
00_sample_02.txt AC 127 ms 8368 KB
01_rnd_00.txt AC 125 ms 8368 KB
01_rnd_01.txt AC 126 ms 8412 KB
01_rnd_02.txt AC 131 ms 8364 KB
01_rnd_03.txt AC 129 ms 8476 KB
01_rnd_04.txt AC 126 ms 8368 KB
01_rnd_05.txt AC 125 ms 8364 KB
01_rnd_06.txt AC 126 ms 8312 KB
01_rnd_07.txt AC 126 ms 8368 KB
01_rnd_08.txt AC 128 ms 8492 KB
01_rnd_09.txt AC 129 ms 8364 KB
01_rnd_10.txt AC 152 ms 8364 KB
01_rnd_11.txt AC 127 ms 8368 KB
01_rnd_12.txt AC 130 ms 8368 KB
01_rnd_13.txt AC 126 ms 8368 KB
01_rnd_14.txt AC 126 ms 8368 KB
01_rnd_15.txt AC 126 ms 8364 KB
01_rnd_16.txt AC 126 ms 8364 KB
01_rnd_17.txt AC 126 ms 8364 KB
01_rnd_18.txt AC 127 ms 8364 KB
01_rnd_19.txt AC 128 ms 8364 KB
02_last_01_0_0.txt AC 126 ms 8368 KB
02_last_01_0_1.txt AC 131 ms 8496 KB
02_last_01_1_0.txt AC 127 ms 8368 KB
02_last_01_1_1.txt AC 126 ms 8368 KB
02_last_01_2_0.txt AC 127 ms 8496 KB
02_last_01_2_1.txt AC 126 ms 8368 KB
02_last_01_3_0.txt AC 129 ms 8368 KB
02_last_01_3_1.txt AC 127 ms 8412 KB
02_last_02_0_0.txt AC 131 ms 8368 KB
02_last_02_0_1.txt AC 135 ms 8364 KB
02_last_02_1_0.txt AC 126 ms 8368 KB
02_last_02_1_1.txt AC 126 ms 8400 KB
02_last_02_2_0.txt AC 129 ms 8368 KB
02_last_02_2_1.txt AC 126 ms 8492 KB
02_last_02_3_0.txt AC 137 ms 8368 KB
02_last_02_3_1.txt AC 126 ms 8368 KB
02_last_03_0_0.txt AC 132 ms 8412 KB
02_last_03_0_1.txt AC 129 ms 8496 KB
02_last_03_1_0.txt AC 132 ms 8364 KB
02_last_03_1_1.txt AC 127 ms 8368 KB
02_last_03_2_0.txt AC 127 ms 8368 KB
02_last_03_2_1.txt AC 127 ms 8368 KB
02_last_03_3_0.txt AC 129 ms 8364 KB
02_last_03_3_1.txt AC 134 ms 8432 KB
02_last_04_0_0.txt AC 125 ms 8368 KB
02_last_04_0_1.txt AC 128 ms 8368 KB
02_last_04_1_0.txt AC 132 ms 8368 KB
02_last_04_1_1.txt AC 132 ms 8368 KB
02_last_04_2_0.txt AC 127 ms 8364 KB
02_last_04_2_1.txt AC 128 ms 8368 KB
02_last_04_3_0.txt AC 128 ms 8364 KB
02_last_04_3_1.txt AC 132 ms 8496 KB
02_last_05_0_0.txt AC 135 ms 8368 KB
02_last_05_0_1.txt AC 131 ms 8532 KB
02_last_05_1_0.txt AC 139 ms 8528 KB
02_last_05_1_1.txt AC 141 ms 8496 KB
02_last_05_2_0.txt AC 134 ms 8400 KB
02_last_05_2_1.txt AC 135 ms 8488 KB
02_last_05_3_0.txt AC 131 ms 8492 KB
02_last_05_3_1.txt AC 140 ms 8492 KB
02_last_06_0_0.txt AC 136 ms 8364 KB
02_last_06_0_1.txt AC 135 ms 8412 KB
02_last_06_1_0.txt AC 128 ms 8368 KB
02_last_06_1_1.txt AC 131 ms 8364 KB
02_last_06_2_0.txt AC 129 ms 8368 KB
02_last_06_2_1.txt AC 126 ms 8368 KB
02_last_06_3_0.txt AC 127 ms 8368 KB
02_last_06_3_1.txt AC 130 ms 8368 KB
02_last_07_0_0.txt AC 128 ms 8496 KB
02_last_07_0_1.txt AC 131 ms 8412 KB
02_last_07_1_0.txt AC 127 ms 8368 KB
02_last_07_1_1.txt AC 127 ms 8492 KB
02_last_07_2_0.txt AC 127 ms 8364 KB
02_last_07_2_1.txt AC 128 ms 8496 KB
02_last_07_3_0.txt AC 129 ms 8368 KB
02_last_07_3_1.txt AC 128 ms 8368 KB
02_last_08_0_0.txt AC 127 ms 8368 KB
02_last_08_0_1.txt AC 128 ms 8368 KB
02_last_08_1_0.txt AC 128 ms 8368 KB
02_last_08_1_1.txt AC 126 ms 8400 KB
02_last_08_2_0.txt AC 129 ms 8364 KB
02_last_08_2_1.txt AC 128 ms 8496 KB
02_last_08_3_0.txt AC 127 ms 8496 KB
02_last_08_3_1.txt AC 126 ms 8368 KB
02_last_09_0_0.txt AC 129 ms 8396 KB
02_last_09_0_1.txt AC 129 ms 8352 KB
02_last_09_1_0.txt AC 128 ms 8364 KB
02_last_09_1_1.txt AC 129 ms 8496 KB
02_last_09_2_0.txt AC 130 ms 8472 KB
02_last_09_2_1.txt AC 127 ms 8496 KB
02_last_09_3_0.txt AC 127 ms 8368 KB
02_last_09_3_1.txt AC 133 ms 8364 KB
02_last_10_0_0.txt AC 128 ms 8368 KB
02_last_10_0_1.txt AC 130 ms 8364 KB
02_last_10_1_0.txt AC 127 ms 8368 KB
02_last_10_1_1.txt AC 127 ms 8432 KB
02_last_10_2_0.txt AC 132 ms 8372 KB
02_last_10_2_1.txt AC 128 ms 8368 KB
02_last_10_3_0.txt AC 133 ms 8368 KB
02_last_10_3_1.txt AC 128 ms 8368 KB
02_last_11_0_0.txt AC 126 ms 8368 KB
02_last_11_0_1.txt AC 128 ms 8368 KB
02_last_11_1_0.txt AC 128 ms 8368 KB
02_last_11_1_1.txt AC 127 ms 8368 KB
02_last_11_2_0.txt AC 128 ms 8388 KB
02_last_11_2_1.txt AC 126 ms 8368 KB
02_last_11_3_0.txt AC 128 ms 8368 KB
02_last_11_3_1.txt AC 129 ms 8364 KB
02_last_12_0_0.txt AC 127 ms 8420 KB
02_last_12_0_1.txt AC 126 ms 8368 KB
02_last_12_1_0.txt AC 127 ms 8368 KB
02_last_12_1_1.txt AC 127 ms 8368 KB
02_last_12_2_0.txt AC 127 ms 8368 KB
02_last_12_2_1.txt AC 127 ms 8364 KB
02_last_12_3_0.txt AC 129 ms 8368 KB
02_last_12_3_1.txt AC 139 ms 8528 KB
03_special_01.txt AC 132 ms 8412 KB
03_special_02.txt AC 129 ms 8492 KB
03_special_03.txt AC 131 ms 8364 KB