200612025-12-31 13:05:15szabelrKedves számokcpp17Time limit exceeded 0/50600ms560 KiB
// Kedves számok.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
using namespace std;
string a;
long long db = 1;
void dfs(int size,int utolso,int meret,int utolsoa)
{	
	if (size < meret or utolso<=utolsoa)
	{
		db++;
	}
	else
		return;
	if (size == meret) return;
	dfs(size+1,0,meret, utolsoa);
	dfs(size+1,3,meret, utolsoa);
}
int main()
{
	int utolso=3, size=1;
	cin >> a;
	int meret=a.size() ;
	int utolsoa = a.back() - '0';
	dfs(size,utolso,meret,utolsoa);
	cout << db;
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms508 KiB
2Time limit exceeded579ms316 KiB
subtask20/4
3Accepted1ms560 KiB
4Accepted1ms316 KiB
5Accepted21ms316 KiB
6Time limit exceeded589ms316 KiB
7Time limit exceeded600ms316 KiB
subtask30/12
8Accepted1ms560 KiB
9Accepted1ms316 KiB
10Accepted21ms316 KiB
11Time limit exceeded589ms316 KiB
12Time limit exceeded600ms316 KiB
13Accepted1ms316 KiB
14Wrong answer2ms316 KiB
15Wrong answer1ms316 KiB
16Time limit exceeded592ms316 KiB
17Time limit exceeded600ms316 KiB
18Time limit exceeded600ms316 KiB
19Time limit exceeded600ms316 KiB
20Time limit exceeded578ms316 KiB
21Time limit exceeded600ms316 KiB
subtask40/10
22Accepted1ms316 KiB
23Accepted1ms508 KiB
24Accepted1ms508 KiB
25Accepted1ms316 KiB
26Wrong answer1ms316 KiB
27Accepted1ms316 KiB
28Accepted1ms316 KiB
29Wrong answer1ms316 KiB
30Wrong answer1ms316 KiB
31Accepted1ms316 KiB
32Accepted1ms316 KiB
33Wrong answer1ms316 KiB
34Wrong answer1ms316 KiB
subtask50/10
35Accepted1ms316 KiB
36Accepted1ms508 KiB
37Accepted1ms508 KiB
38Accepted1ms316 KiB
39Wrong answer1ms316 KiB
40Accepted1ms316 KiB
41Accepted1ms316 KiB
42Wrong answer1ms316 KiB
43Wrong answer1ms316 KiB
44Accepted1ms316 KiB
45Accepted1ms316 KiB
46Wrong answer1ms316 KiB
47Wrong answer1ms316 KiB
48Accepted1ms316 KiB
49Accepted1ms316 KiB
50Wrong answer1ms316 KiB
51Accepted1ms316 KiB
52Wrong answer1ms316 KiB
53Wrong answer1ms316 KiB
54Accepted1ms332 KiB
55Wrong answer1ms316 KiB
56Accepted1ms316 KiB
57Wrong answer1ms316 KiB
58Wrong answer1ms316 KiB
59Wrong answer1ms316 KiB
60Wrong answer1ms316 KiB
61Wrong answer1ms316 KiB
62Wrong answer1ms316 KiB
63Wrong answer1ms316 KiB
64Wrong answer1ms316 KiB
65Wrong answer1ms316 KiB
subtask60/14
66Accepted2ms552 KiB
67Time limit exceeded597ms316 KiB
68Accepted1ms560 KiB
69Accepted1ms316 KiB
70Accepted21ms316 KiB
71Time limit exceeded589ms316 KiB
72Time limit exceeded600ms316 KiB
73Accepted1ms316 KiB
74Wrong answer2ms316 KiB
75Wrong answer1ms316 KiB
76Time limit exceeded592ms316 KiB
77Time limit exceeded600ms316 KiB
78Time limit exceeded600ms316 KiB
79Time limit exceeded600ms316 KiB
80Time limit exceeded578ms316 KiB
81Time limit exceeded600ms316 KiB
82Accepted1ms316 KiB
83Accepted1ms508 KiB
84Accepted1ms508 KiB
85Accepted1ms316 KiB
86Wrong answer1ms316 KiB
87Accepted1ms316 KiB
88Accepted1ms316 KiB
89Wrong answer1ms316 KiB
90Wrong answer1ms316 KiB
91Accepted1ms316 KiB
92Accepted1ms316 KiB
93Wrong answer1ms316 KiB
94Wrong answer1ms316 KiB
95Accepted1ms316 KiB
96Accepted1ms316 KiB
97Wrong answer1ms316 KiB
98Accepted1ms316 KiB
99Wrong answer1ms316 KiB
100Wrong answer1ms316 KiB
101Accepted1ms332 KiB
102Wrong answer1ms316 KiB
103Accepted1ms316 KiB
104Wrong answer1ms316 KiB
105Wrong answer1ms316 KiB
106Wrong answer1ms316 KiB
107Wrong answer1ms316 KiB
108Wrong answer1ms316 KiB
109Wrong answer1ms316 KiB
110Wrong answer1ms316 KiB
111Wrong answer1ms316 KiB
112Wrong answer1ms316 KiB
113Time limit exceeded597ms316 KiB
114Accepted82ms500 KiB
115Wrong answer63ms396 KiB
116Wrong answer82ms396 KiB
117Time limit exceeded600ms316 KiB
118Time limit exceeded578ms316 KiB
119Time limit exceeded586ms500 KiB
120Time limit exceeded584ms316 KiB
121Time limit exceeded586ms508 KiB
122Wrong answer82ms316 KiB
123Time limit exceeded583ms316 KiB
124Time limit exceeded587ms316 KiB
125Wrong answer82ms316 KiB
126Time limit exceeded582ms316 KiB
127Time limit exceeded584ms316 KiB
128Time limit exceeded578ms316 KiB
129Time limit exceeded589ms364 KiB
130Time limit exceeded579ms316 KiB
131Time limit exceeded583ms316 KiB