結果
| 問題 |
No.494 yukicoder
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-19 19:29:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 353 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 27,648 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-03 07:56:00 |
| 合計ジャッジ時間 | 895 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%s",S);
| ~~~~~^~~~~~~~
ソースコード
#include <stdio.h>
int main(){
//input
char S[9+1];
scanf("%s",S);
//char total of "yukicoder"
int t1 = 'y'+'u'+'k'+'i'+'c'+'o'+'d'+'e'+'r';
//char total of S
int t2 = 0;
for (int i = 0;i < 9;i++){
if (S[i] != '?'){
t2 += S[i];
}
}
//output
printf("%c\n",t1-t2);
return 0;
}