結果

問題 No.509 塗りつぶしツール
ユーザー tanimani364tanimani364
提出日時 2021-03-29 17:21:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 499 bytes
コンパイル時間 828 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 81,160 KB
最終ジャッジ日時 2023-08-19 16:18:04
合計ジャッジ時間 7,424 ms
ジャッジサーバーID
(参考情報)
judge13 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 159 ms
80,760 KB
testcase_01 AC 160 ms
80,736 KB
testcase_02 AC 158 ms
80,744 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 160 ms
80,976 KB
testcase_07 WA -
testcase_08 AC 160 ms
80,828 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 159 ms
80,972 KB
testcase_15 WA -
testcase_16 AC 157 ms
80,824 KB
testcase_17 WA -
testcase_18 AC 157 ms
80,972 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 158 ms
80,760 KB
testcase_23 AC 159 ms
80,880 KB
testcase_24 AC 159 ms
81,008 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 165 ms
80,688 KB
testcase_28 AC 160 ms
81,160 KB
testcase_29 AC 158 ms
80,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
#coding:utf-8

import math
import string
import random
import heapq
from sys import stdin
# import numpy as np
# from matplotlib import pyplot as plt
	
def add(c):
	if c=='0':
		return 1
	elif c=='4':
		return 1
	elif c=='6':
		return 1
	elif c=='8':
		return 2
	elif c=='9':
		return 1
	else :
		return 0

def main():
	read=stdin.readline

	#edit here!
	s=read()
	n=len(s)
	n-=1
	ans=n*2+1
	for i in range(n):
		ans+=add(s[i])
	print(ans)

if __name__ == '__main__':
	main()
0