結果
| 問題 |
No.1849 Three Times Value
|
| ユーザー |
ytft
|
| 提出日時 | 2022-03-11 23:09:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 179 bytes |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 51,840 KB |
| 最終ジャッジ日時 | 2024-09-16 03:30:59 |
| 合計ジャッジ時間 | 2,278 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
import sys
input=lambda:sys.stdin.readline().rstrip()
N=input()
l=len(N)
if l<3:
print("0")
elif l%3:
print("9"*(l//3))
else:
print(int(N[:l//3])-(int(N[:l//3]*3)>int(N)))
ytft