結果
問題 |
No.2247 01 ZigZag
|
ユーザー |
![]() |
提出日時 | 2023-03-17 22:40:45 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 458 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 53,632 KB |
最終ジャッジ日時 | 2024-09-18 11:45:59 |
合計ジャッジ時間 | 3,785 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 42 WA * 8 |
ソースコード
n, m, k = map(int, input().split()) def f(k): c = (k-1)//2 if c >= n or c >= m: return -1 else: return '0'*(n-c)+'10'*c+'1'*(m-c) if k % 2: print(f(k)) else: if k == 0: if m == 0: print('0'*n) elif n == 0: print('1'*m) else: print(-1) else: res = f(k-1) if res == -1: print(-1) else: print(f(k-1)[1:]+'0')