# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
4211 |
2013-09-05T09:38:51 Z |
dbfud |
간지(干支) (KOI13_kanji) |
C++ |
|
0 ms |
1672 KB |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
int year = 0 ;
int compareYear = 2013 ;
cin >> year ;
int sibgan[10] = { 0,1,2,3,4,5,6,7,8,9 } ;
char sibez[12] = { 'A','B','C','D','E','F','G','H','J','K','L'};
int sibganIndex = 9 ;
int sibezIndex = 5 ;
int minusYear = year - compareYear ;
if( minusYear >= 0)
{
for ( int i = 0; i < minusYear ; i++ )
{
sibganIndex++ ;
sibezIndex++ ;
if ( sibganIndex > 9 )
sibganIndex = 0 ;
if ( sibezIndex > 11 )
sibezIndex = 0 ;
}
}
else
{
minusYear *= -1 ;
for ( int i = minusYear; i > 0 ; i-- )
{
sibganIndex-- ;
sibezIndex-- ;
if ( sibganIndex < 0 )
sibganIndex = 9 ;
if ( sibezIndex < 0 )
sibezIndex = 11 ;
}
}
cout << sibez[sibezIndex] << sibgan[sibganIndex] ;
//system("PAUSE");
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |