結果
問題 | No.346 チワワ数え上げ問題 |
ユーザー |
![]() |
提出日時 | 2016-08-11 21:38:30 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 347 bytes |
コンパイル時間 | 395 ms |
コンパイル使用メモリ | 31,360 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 11:05:26 |
合計ジャッジ時間 | 1,260 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
program main implicit none integer*8::N,w,nw,i,comb,total character*100000::S read *,S nw = -1 comb = 0 total = 0 do i=LEN_TRIM(S),1,-1 if(S(i:i).eq.'w') then nw = nw + 1 comb = comb + nw else if(S(i:i).eq.'c') then total = total + comb end if end do print '(i0)', total end program main