結果
問題 |
No.690 E869120 and Constructing Array 4
|
ユーザー |
|
提出日時 | 2018-05-18 23:42:45 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 44 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-06-28 14:03:54 |
合計ジャッジ時間 | 3,286 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 3 WA * 16 |
ソースコード
K = input() if K == 0: print 2, 0 exit() K -= 1 ans = [] for i in xrange(31): ans.append((i, i+1)) for i in xrange(29, -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