結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2025-03-07 16:59:13 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 387 ms |
コンパイル使用メモリ | 24,192 KB |
実行使用メモリ | 18,624 KB |
最終ジャッジ日時 | 2025-03-07 16:59:26 |
合計ジャッジ時間 | 13,247 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 3 |
other | -- * 16 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:28: warning: comparison between pointer and integer 9 | if(bendStr == 'L'){ | ^~ 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 == 'L'){ nowLane = nowLane * 2; }else{ nowLane = nowLane * 2 + 1; } } printf("%d",nowLane); }