結果
| 問題 |
No.104 国道
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-07 17:03:28 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 273 bytes |
| コンパイル時間 | 339 ms |
| コンパイル使用メモリ | 24,320 KB |
| 実行使用メモリ | 8,612 KB |
| 最終ジャッジ日時 | 2025-03-07 17:03:29 |
| 合計ジャッジ時間 | 1,170 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 16 |
コンパイルメッセージ
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("%s",bendStr);
| ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
void main(void){
char bendStr[100] = "a";
scanf("%s",bendStr);
int i = 0;
int nowLane = 1;
while(bendStr[i] != '\0'){
if(bendStr[i] == 'L'){
nowLane = nowLane * 2;
}else{
nowLane = nowLane * 2 + 1;
}
i++;
}
printf("%d",nowLane);
}
Maeda