結果
問題 |
No.690 E869120 and Constructing Array 4
|
ユーザー |
|
提出日時 | 2018-05-18 23:38:44 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-06-28 14:03:07 |
合計ジャッジ時間 | 4,213 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 1 WA * 18 |
ソースコード
K = input() if K == 0: print 2, 0 exit() ans = [] for i in xrange(32): ans.append((i, i+1)) for i in xrange(30, -1, -1): if K == 0: break if K % 2 == 0: for j in xrange(i+2, 32): ans.append((i, j)) K /= 2 else: ans.append((i, 31)) K -= 1 print 32, len(ans) for a in ans: print a[0]+1, a[1]+1