結果
問題 |
No.1185 完全な3の倍数
|
ユーザー |
![]() |
提出日時 | 2024-12-29 19:16:14 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 302 bytes |
コンパイル時間 | 348 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-12-29 19:16:18 |
合計ジャッジ時間 | 3,584 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 22 |
ソースコード
N = int(input()) SN = str(N) cnt = 0 if N < 100: print((N-9)//3) exit() if int(SN[0]) < 3: N2 = [3] * (len(SN) - 1) else: N2 = [] while N > 0: N2.append((N%10)//3) N //= 10 ans = 30 tmp = 0 for i in reversed(N2): tmp *= 4 tmp += i ans += tmp - 15 print(ans)