Submission #76624059
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
//#define int ll
//#define ll long long
#define pb emplace_back
#define pr pair<int,int>
#define mp make_pair
#define endl "\n"
inline int read()
{
int x=0,f=1;char ch=getchar();
while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=getchar();}
while (ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}
return x*f;
}
void write(int x)
{
if(x<0)putchar('-'),x=-x;
if(x<10)putchar(x+'0');
else write(x/10),putchar(x%10+'0');
}
string a;
signed main(){
cin>>a;
for(int i=0;i<a.size();i++) if(a[i]>='0'&&a[i]<='9') cout<<a[i];
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Secret Numbers |
| User | Fireflies |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 616 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3584 KiB |
Compile Error
./Main.cpp: In function 'int main()':
./Main.cpp:25:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | for(int i=0;i<a.size();i++) if(a[i]>='0'&&a[i]<='9') cout<<a[i];
| ~^~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3540 KiB |
| 00_sample_01.txt | AC | 1 ms | 3444 KiB |
| 00_sample_02.txt | AC | 1 ms | 3428 KiB |
| 00_sample_03.txt | AC | 1 ms | 3464 KiB |
| 01_random_00.txt | AC | 1 ms | 3388 KiB |
| 01_random_01.txt | AC | 1 ms | 3388 KiB |
| 01_random_02.txt | AC | 1 ms | 3524 KiB |
| 01_random_03.txt | AC | 1 ms | 3552 KiB |
| 01_random_04.txt | AC | 1 ms | 3408 KiB |
| 01_random_05.txt | AC | 1 ms | 3444 KiB |
| 01_random_06.txt | AC | 1 ms | 3528 KiB |
| 01_random_07.txt | AC | 1 ms | 3408 KiB |
| 01_random_08.txt | AC | 1 ms | 3472 KiB |
| 01_random_09.txt | AC | 1 ms | 3528 KiB |
| 01_random_10.txt | AC | 1 ms | 3584 KiB |
| 01_random_11.txt | AC | 1 ms | 3528 KiB |