#10426: 求高手幫忙


dddd1597 (johnson0331)

School : 臺北市立內湖高級工業職業學校
ID : 51316
IP address : [61.216.112.118]
Last Login :
2017-12-31 16:16:44
d670. 10921 - Find the Telephone -- UVa10921 | From: [118.169.125.134] | Post Date : 2015-11-04 21:59

第 1 測資點(100%): WA (line:1) 
答案不正確 

您的答案為: 1-4663-79338-466369-64 ...略
正確答案為: 1-4663-79338-4663



#include <stdio.h> #include <stdlib.h> int main() { char ch; while(scanf("%C",&ch)!=EOF){ if(ch=='A') printf("2"); else if(ch=='B') printf("2"); else if(ch=='C') printf("2"); else if(ch=='D') printf("3"); else if(ch=='E') printf("3"); else if(ch=='F') printf("3"); else if(ch=='G') printf("4"); else if(ch=='H') printf("4"); else if(ch=='I') printf("4"); else if(ch=='J') printf("5"); else if(ch=='K') printf("5"); else if(ch=='L') printf("5"); else if(ch=='M') printf("6"); else if(ch=='N') printf("6"); else if(ch=='O') printf("6"); else if(ch=='P') printf("7"); else if(ch=='Q') printf("7"); else if(ch=='R') printf("7"); else if(ch=='S') printf("7"); else if(ch=='T') printf("8"); else if(ch=='U') printf("8"); else if(ch=='V') printf("8"); else if(ch=='W') printf("9"); else if(ch=='X') printf("9"); else if(ch=='Y') printf("9"); else if(ch=='Z') printf("9"); else if(ch=='1') printf("1"); else if(ch=='-') printf("-"); else if(ch=='0') printf("0"); } return 0; }
 
#28647: Re:求高手幫忙


yp11051231@yphs.tp.edu.tw (910-36 楊宸)

School : 臺北市私立延平高級中學
ID : 165190
IP address : [203.72.178.2]
Last Login :
2024-10-23 12:41:56
d670. 10921 - Find the Telephone -- UVa10921 | From: [203.72.178.1] | Post Date : 2021-12-23 17:09

第 1 測資點(100%): WA (line:1) 
答案不正確 

您的答案為: 1-4663-79338-466369-64 ...略
正確答案為: 1-4663-79338-4663



#include #include int main() { char ch; while(scanf("%C",&ch)!=EOF){ if(ch=='A') printf("2"); else if(ch=='B') printf("2"); else if(ch=='C') printf("2"); else if(ch=='D') printf("3"); else if(ch=='E') printf("3"); else if(ch=='F') printf("3"); else if(ch=='G') printf("4"); else if(ch=='H') printf("4"); else if(ch=='I') printf("4"); else if(ch=='J') printf("5"); else if(ch=='K') printf("5"); else if(ch=='L') printf("5"); else if(ch=='M') printf("6"); else if(ch=='N') printf("6"); else if(ch=='O') printf("6"); else if(ch=='P') printf("7"); else if(ch=='Q') printf("7"); else if(ch=='R') printf("7"); else if(ch=='S') printf("7"); else if(ch=='T') printf("8"); else if(ch=='U') printf("8"); else if(ch=='V') printf("8"); else if(ch=='W') printf("9"); else if(ch=='X') printf("9"); else if(ch=='Y') printf("9"); else if(ch=='Z') printf("9"); else if(ch=='1') printf("1"); else if(ch=='-') printf("-"); else if(ch=='0') printf("0"); } return 0; }

你最後要換行。

 
ZeroJudge Forum