Submission #25403565
Source Code Expand
#include<bits/stdc++.h>
const int N=100050;
using namespace std;
int n,a,b;
main(){
scanf("%2d.%d",&a,&b);
if(b<=2)printf("%d-",a);
else if(b>=7)printf("%d+",a);
else printf("%d",a);
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Signed Difficulty |
| User | Corpsdorg |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 203 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3824 KiB |
Compile Error
./Main.cpp:7:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
7 | main(){
| ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:8:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%2d.%d",&a,&b);
| ~~~~~^~~~~~~~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 7 ms | 3604 KiB |
| 001.txt | AC | 2 ms | 3824 KiB |
| 002.txt | AC | 4 ms | 3588 KiB |
| 003.txt | AC | 1 ms | 3580 KiB |
| 004.txt | AC | 3 ms | 3716 KiB |
| 005.txt | AC | 2 ms | 3716 KiB |
| 006.txt | AC | 2 ms | 3624 KiB |
| example0.txt | AC | 2 ms | 3628 KiB |
| example1.txt | AC | 3 ms | 3636 KiB |
| example2.txt | AC | 6 ms | 3716 KiB |