結果

問題 No.2247 01 ZigZag
ユーザー katonyonko
提出日時 2023-03-17 21:42:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 290 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 81,648 KB
実行使用メモリ 59,668 KB
最終ジャッジ日時 2024-09-18 10:30:50
合計ジャッジ時間 3,490 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 35 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
def cnt(a,N,M):
  if N==0 or M==0: return 0
  elif a==0: return 1
  else: return 2*a-1+(1 if M>a else 0)+(1 if N>a else 0)
ans=-1
for i in range(min(N,M)+1):
  if cnt(i,N,M)==K: ans=i; break
if ans==-1: print(ans)
else: print('0'*(N-ans)+'10'*ans+'1'*(M-ans))
0