結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2016-10-12 20:20:42 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 183 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-22 01:51:39 |
合計ジャッジ時間 | 756 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%c", &c); | ^~~~~~~~~~~~~~~ main.c:10:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%c", &c); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(){char c;int i = 1;scanf("%c", &c);while(c != '\n'){i = i*2 + (c=='L'?0:1);scanf("%c", &c);}printf("%d\n", i);return 0;}