結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2023-06-08 13:25:30 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 494 bytes |
コンパイル時間 | 1,176 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 20:44:26 |
合計ジャッジ時間 | 2,084 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <stdio.h>#include <malloc.h>char str[60000];int str_len = 0;/// <summary>/// グローバル変数strの中身を入力された文字列で上書きする/// </summary>void ReadString() {char c = getchar();str_len = 0;while (c != '\n') {str[str_len] = c;c = getchar();str_len++;}}int main(){ReadString();int now = 1;for (int i = 0;i < str_len;i++) {if (str_len == 0) break;now *= 2;if (str[i] == 'R') now += 1;}printf("%d\n", now);}