P5461 赦免战俘(python3实现)

  • Post author:
  • Post category:python



赦免战俘 – 洛谷

"""

P5461 赦免战俘(python3实现)
https://www.luogu.com.cn/problem/P5461

"""

n=int( input( ) )

for i in range( 1<<n):

            for j in range( 1<<n):

                        if (i|j)!=((1<<n)-1):
                                    ans=0
                        else:
                                    ans=1

                        print(ans,end=" ")
            print()




2.1基本算法之枚举_1749数字方格


https://blog.csdn.net/dllglvzhenfeng/article/details/122272656

2.1基本算法之枚举_1812完美立方


https://blog.csdn.net/dllglvzhenfeng/article/details/122303124

Openjudge_ 2.1基本算法之枚举_1809 两倍 C++ scratch


https://blog.csdn.net/dllglvzhenfeng/article/details/122275466

2.2基本算法之递归和自调用函数_7592 求最大公约数问题


https://blog.csdn.net/dllglvzhenfeng/article/details/122308847

2.2 基本算法之递归和自调用函数 8758 2的幂次方表示 python


https://blog.csdn.net/dllglvzhenfeng/article/details/122529020

2.2 基本算法之递归和自调用函数 1751 分解因数 python


http://noi.openjudge.cn/ch0202/1751/



版权声明:本文为dllglvzhenfeng原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。