Submission #3259913


Source Code Expand

#include<stdio.h>
#include<iostream>
#include<math.h>
#include<cmath>
#include<string.h>
using namespace std;
int main()
{
	char o[60], e[60];
	int lo, le, lans;
	int i, j = 0;
	int tag = 1;
	char ans[110];
	scanf("%s %s", &o, &e);
	lo = strlen(o);
	le = strlen(e);
	
	for(i = 0; i < lo; i++)
	{
		ans[2 * i] = o[i];	
	}
	for(i = 1; i <= le; i++)
	{
		    ans[2 * i - 1] = e[i - 1];
	}
	lans = strlen(ans);
	printf("%s\n", ans);


}

Submission Info

Submission Time
Task B - ∵∴∵
User vjudge3
Language C++14 (GCC 5.4.1)
Score 0
Code Size 432 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:14:23: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[60]’ [-Wformat=]
  scanf("%s %s", &o, &e);
                       ^
./Main.cpp:14:23: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[60]’ [-Wformat=]
./Main.cpp:14:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%s %s", &o, &e);
                        ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 2
AC × 9
WA × 1
Set Name Test Cases
Sample 0_000.txt, 0_001.txt
All 0_000.txt, 0_001.txt, rnd0.txt, rnd1.txt, rnd2.txt, rnd3.txt, short1.txt, short2.txt, short3.txt, wf.txt
Case Name Status Exec Time Memory
0_000.txt AC 1 ms 256 KB
0_001.txt AC 1 ms 256 KB
rnd0.txt AC 1 ms 256 KB
rnd1.txt WA 1 ms 256 KB
rnd2.txt AC 1 ms 256 KB
rnd3.txt AC 1 ms 256 KB
short1.txt AC 1 ms 256 KB
short2.txt AC 1 ms 256 KB
short3.txt AC 1 ms 256 KB
wf.txt AC 1 ms 256 KB