結果
| 問題 |
No.1735 C#
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-13 17:27:36 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 283 bytes |
| コンパイル時間 | 389 ms |
| コンパイル使用メモリ | 23,936 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-13 17:27:37 |
| 合計ジャッジ時間 | 1,052 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%c",&interval);
| ^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
void main(void){
char pitch[100] = "CDEFGABC";
char interval = 'a';
scanf("%c",&interval);
int i = 0;
while(pitch[i] != interval){
i++;
}
if(pitch[i] == 'E'){
printf("F");
}else if(pitch[i] == 'B'){
printf("C");
}else{
printf("%c#",pitch[i]);
}
}
Maeda