Add 2021, 2023
This commit is contained in:
		
							
								
								
									
										12
									
								
								2021/day3.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								2021/day3.py
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    with open("day3.sample", "r") as file:
 | 
			
		||||
        lines = file.readlines()
 | 
			
		||||
 | 
			
		||||
    for line in lines:
 | 
			
		||||
        print(int(line.strip(), 2))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == "__main__":
 | 
			
		||||
    main()
 | 
			
		||||
							
								
								
									
										12
									
								
								2021/day3.sample
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								2021/day3.sample
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
00100
 | 
			
		||||
11110
 | 
			
		||||
10110
 | 
			
		||||
10111
 | 
			
		||||
10101
 | 
			
		||||
01111
 | 
			
		||||
00111
 | 
			
		||||
11100
 | 
			
		||||
10000
 | 
			
		||||
11001
 | 
			
		||||
00010
 | 
			
		||||
01010
 | 
			
		||||
		Reference in New Issue
	
	Block a user