Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
104645 王子毅 11加密规则 C++ Wrong Answer 1 MS 264 KB 919 2025-01-05 21:05:52

Tests(0/10):


Code:

#include <iostream> using namespace std; int main() { int password[6]; for (int i = 0; i < 6; ++i) { cin >> password[i]; } char firstChar = 'A' + password[0]; char secondChar; if (password[1] % 2 == 0) { secondChar = (password[1] / 2) + '0'; } else { secondChar = password[1] + '0'; } int sumFirstThree = password[0] + password[1] + password[2]; char thirdChar = (sumFirstThree % 10) + '0'; char fourthChar = password[3] + '0'; int leSum = 'l' + 'e'; int fifthCharValue = ((leSum + password[4]) / 10) % 10; char fifthChar = fifthCharValue + '0'; int sumAll = password[0] + password[1] + password[2] + password[3] + password[4] + password[5]; char sixthChar = (sumAll % 10) + '0'; cout << firstChar << secondChar << thirdChar << fourthChar << fifthChar << sixthChar << endl; return 0; }


Run Info:

------Input------
115209
------Answer-----
B17208
------Your output-----
J07015