Submission #64075417
Source Code Expand
Copy
#include <bits/stdc++.h>using namespace std;int main(){int n;scanf("%d",&n);if(n&1){for(int i=1;i<=n/2;i++) printf("-");printf("=");for(int i=1;i<=n/2;i++) printf("-");}else{for(int i=1;i<n/2;i++) printf("-");printf("==");for(int i=1;i<n/2;i++) printf("-");}}
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d",&n); if(n&1) { for(int i=1;i<=n/2;i++) printf("-"); printf("="); for(int i=1;i<=n/2;i++) printf("-"); } else { for(int i=1;i<n/2;i++) printf("-"); printf("=="); for(int i=1;i<n/2;i++) printf("-"); } }
Submission Info
Submission Time | |
---|---|
Task | A - Doors in the Center |
User | yuanzijin |
Language | C++ 20 (gcc 12.2) |
Score | 100 |
Code Size | 363 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3872 KB |
Compile Error
Main.cpp: In function ‘int main()’: Main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d",&n); | ~~~~~^~~~~~~~~
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
random_03.txt | AC | 1 ms | 3872 KB |
random_04.txt | AC | 1 ms | 3700 KB |
random_05.txt | AC | 1 ms | 3688 KB |
random_06.txt | AC | 1 ms | 3624 KB |
random_07.txt | AC | 1 ms | 3704 KB |
random_08.txt | AC | 1 ms | 3748 KB |
random_09.txt | AC | 1 ms | 3700 KB |
random_10.txt | AC | 1 ms | 3872 KB |
sample_01.txt | AC | 1 ms | 3656 KB |
sample_02.txt | AC | 1 ms | 3656 KB |