結果
問題 |
No.22 括弧の対応
|
ユーザー |
👑 ![]() |
提出日時 | 2015-08-05 02:57:37 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 179 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 07:03:07 |
合計ジャッジ時間 | 1,168 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d%d",&n,&n);i=n-1; | ^~~~~~~~~~~~~~~~~~~ main.c:6:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%s",s);n=s[i]; | ^~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ int n,i,t=0; char s[10001]; scanf("%d%d",&n,&n);i=n-1; scanf("%s",s);n=s[i]; while(t-81+n*2)t+=s[n-40?--i:++i]*2-81; printf("%d\n",i+1); return 0; }