結果
| 問題 | No.637 X: Yet Another FizzBuzz Problem |
| コンテスト | |
| ユーザー |
hooooyaert
|
| 提出日時 | 2018-07-26 20:06:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 1,000 ms |
| コード長 | 474 bytes |
| 記録 | |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-01 03:24:46 |
| 合計ジャッジ時間 | 2,078 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
def check_three(num):
if num % 3 == 0:
three = 1
else:
three = 0
return three
def check_five(num):
if num % 5 == 0:
five = 1
else:
five = 0
return five
a = input().split()
N = 0
for i in range(len(a)):
if check_three(int(a[i])) + check_five(int(a[i])) == 2:
N+=8
elif check_three(int(a[i])) + check_five(int(a[i])) == 1:
N += 4
else:
N += len(a[i])
print(N)
hooooyaert