Submission #1335680
Source Code Expand
#include <stdio.h> int main() { int deg, dis; int hu, f; int dir; const char houi[] = "C\0\0N\0\0NNENE\0ENEE\0\0ESESE\0SSES\0\0SSWSW\0WSWW\0\0WNWNW\0NNW\0"; scanf("%d %d", °, &dis); hu = dis / 6 + ((dis * 100/60)%10>4); if (hu <= 2) { f = 0; } else if (hu <= 15) { f = 1; } else if (hu <= 33) { f = 2; } else if (hu <= 54) { f = 3; } else if (hu <= 79) { f = 4; } else if (hu <= 107) { f = 5; } else if (hu <= 138) { f = 6; } else if (hu <= 171) { f = 7; } else if (hu <= 207) { f = 8; } else if (hu <= 244) { f = 9; } else if (hu <= 284) { f = 10; } else if (hu <= 326) { f = 11; } else { f = 12; } //225 if (f>0) { dir = ((deg - 113) / 225 + 1)%16+1; } else { dir = 0; } printf("%c%c%c", houi[dir * 3], houi[dir * 3 + 1], houi[dir * 3 + 2]); printf(" %d\n", f); }
Submission Info
Submission Time | |
---|---|
Task | A - 積雪深差 |
User | ibuki2003 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 905 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:8:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", °, &dis); ^
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | WA | 1 ms | 128 KB |
00_sample_02.txt | WA | 1 ms | 128 KB |
00_sample_03.txt | WA | 1 ms | 128 KB |
test_01.txt | WA | 1 ms | 128 KB |
test_02.txt | WA | 1 ms | 128 KB |
test_03.txt | WA | 1 ms | 128 KB |
test_04.txt | WA | 1 ms | 128 KB |
test_05.txt | WA | 1 ms | 128 KB |
test_06.txt | WA | 1 ms | 128 KB |
test_07.txt | WA | 1 ms | 128 KB |
test_08.txt | WA | 1 ms | 128 KB |
test_09.txt | WA | 1 ms | 128 KB |
test_10.txt | WA | 1 ms | 128 KB |
test_11.txt | WA | 1 ms | 128 KB |
test_12.txt | WA | 1 ms | 128 KB |
test_13.txt | WA | 1 ms | 128 KB |
test_14.txt | WA | 1 ms | 128 KB |
test_15.txt | WA | 1 ms | 128 KB |
test_16.txt | WA | 1 ms | 128 KB |
test_17.txt | WA | 1 ms | 128 KB |