結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
|
提出日時 | 2017-09-28 23:20:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 127 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-15 18:26:09 |
合計ジャッジ時間 | 2,240 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 16 |
ソースコード
#!/usr/bin/env python3 # -*- coding: utf-8 -*- HOLE = ( 1, 0, 0, 0, 1, 0, 1, 0, 2, 1 ) def main(): S = input() # 各文字を赤で塗る ans = len(S) # 外側を黒で塗る ans += 1 # 各文字内部の穴を黒で塗る ans += sum(HOLE[int(c)] for c in S) # 各文字を白で塗る ans += len(S) print(ans) if __name__ == "__main__": main()