結果
問題 | No.1057 素敵な日 |
ユーザー | Geckoちゃん |
提出日時 | 2020-05-22 21:34:23 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 242 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-05 15:51:39 |
合計ジャッジ時間 | 795 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 |
ソースコード
a,b=map(int,input().split()) # large is 1 a,b=max(a,b), min(a,b) tmp = "" for f1, f2 in zip(["1"]*a,["0"]*b): tmp += f1 + f2 tmp += "1"*(a-b) c = 0 for i in range(len(tmp)-1): if tmp[i:i+2] in {"10", "01"}: c += 1 print(c)