結果
問題 |
No.2247 01 ZigZag
|
ユーザー |
![]() |
提出日時 | 2023-03-17 21:48:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 417 bytes |
コンパイル時間 | 255 ms |
コンパイル使用メモリ | 82,100 KB |
実行使用メモリ | 70,592 KB |
最終ジャッジ日時 | 2024-09-18 10:38:55 |
合計ジャッジ時間 | 3,449 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 38 WA * 9 RE * 3 |
ソースコード
import sys, math input = lambda: sys.stdin.readline()[:-1] def MI(): return map(int, input().split()) inf = 10**18 n,m,k = MI() cnt = [0,0] ans = [] for i in range(k+1): cnt[i%2] += 1 ans.append(str(i%2)) # print(ans) # print(cnt) if cnt[0] > n or cnt[1] > m: print(-1); exit() ans[0] += '0'*(n-cnt[0]) if (k+1)%2==0: ans[-1] += '1'*(m-cnt[1]) else: ans[-2] += '1'*(m-cnt[1]) print("".join(ans))