Submission #19515527


Source Code Expand

Copy
#include <iostream>
using namespace std;
int main (){short a; string b; cin>>a>>b;
if (a==b.length()) cout<<b;
else {for (int c=0;c<a;c++) cout<<b[c]; cout<<"...";}
}

Submission Info

Submission Time
Task B - ... (Triple Dots)
User Kh4aled
Language C++ (GCC 9.2.1)
Score 0
Code Size 173 Byte
Status WA
Exec Time 9 ms
Memory 3576 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:4:6: warning: comparison of integer expressions of different signedness: ‘short int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    4 | if (a==b.length()) cout<<b;
      |     ~^~~~~~~~~~~~

Judge Result

Set Name Sample Subtask1
Score / Max Score 0 / 0 0 / 200
Status
AC × 1
WA × 1
AC × 11
WA × 4
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
Subtask1 sample_01.txt, sample_02.txt, sub1_01.txt, sub1_02.txt, sub1_03.txt, sub1_04.txt, sub1_05.txt, sub1_06.txt, sub1_07.txt, sub1_08.txt, sub1_09.txt, sub1_10.txt, sub1_11.txt, sub1_12.txt, sub1_13.txt
Case Name Status Exec Time Memory
sample_01.txt AC 9 ms 3532 KB
sample_02.txt WA 2 ms 3528 KB
sub1_01.txt AC 2 ms 3576 KB
sub1_02.txt WA 2 ms 3516 KB
sub1_03.txt AC 2 ms 3516 KB
sub1_04.txt AC 2 ms 3372 KB
sub1_05.txt AC 2 ms 3372 KB
sub1_06.txt AC 2 ms 3572 KB
sub1_07.txt WA 4 ms 3532 KB
sub1_08.txt WA 3 ms 3488 KB
sub1_09.txt AC 2 ms 3432 KB
sub1_10.txt AC 2 ms 3576 KB
sub1_11.txt AC 2 ms 3536 KB
sub1_12.txt AC 2 ms 3444 KB
sub1_13.txt AC 2 ms 3488 KB